* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* デフォルトは非表示 */
.ad {
  display: none;
}

/* PC画面 (768px以上) でPC用広告を表示 */
@media (min-width: 768px) {
  .ad-pc {
    display: block;
  }
}

/* スマホ画面 (767px以下) でスマホ用広告を表示 */
@media (max-width: 767px) {
  .ad-mobile {
    display: block;
  }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #44f9ff 0%, #cc9dfc 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    min-height: 100vh;
}

.main-content {
    background: rgb(255, 43, 142);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.header {
    background: linear-gradient(135deg, #ff4be7, #b820ff);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.vote-input:focus {
    outline: none;
    border-color: #667eea;
}

.vote-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.vote-btn:hover {
    transform: translateY(-2px);
}

.error-message {
    color: #ff4757;
    background: #ffe0e6;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #ffb3ba;
}

@keyframes modalAppear {
    to {
        transform: scale(1);
    }
}

.ranking-section {
    padding: 30px;
    background-color: #fc6cdd;
}

.ranking-title {
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
    font-size: 2em;
    text-shadow: 2px 2px 5px #ff66cc, -2px -2px 5px #66ccff;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #f8f9ff, #e8eeff);
    border-radius: 12px;
    transition: all 0.3s;
    border-left: 5px solid #667eea;
}

.ranking-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.ranking-item.top-3 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-left-color: #ffa500;
}

.ranking-number {
    font-size: 2em;
    font-weight: bold;
    margin-right: 20px;
    min-width: 60px;
    text-align: center;
    color: #667eea;
}

.ranking-item.top-3 .ranking-number {
    color: #d4a100;
}

.ranking-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ranking-info {
    flex-grow: 1;
}

.ranking-title-item {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
    color: #696464;
}

.ranking-score {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin-left: auto;
}

.ranking-item.top-3 .ranking-score {
    color: #d4a100;
}

.ranking-tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ranking-item.top-3 .tag {
    background: linear-gradient(135deg, #ffa500, #ff8c00);
}

.ranking-item.top-3 .tag:hover {
    background: linear-gradient(135deg, #ff8c00, #ff7700);
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .ranking-item {
        flex-direction: column;
        text-align: center;
    }
    
    .ranking-image {
        margin: 0 0 15px 0;
    }
    
    .ranking-number {
        margin: 0 0 10px 0;
    }
}