* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Styles */
.header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header h1 i {
    font-size: 1.8rem;
}

.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.update-info {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
}

.last-update,
.next-update {
    display: flex;
    align-items: center;
    gap: 5px;
}

.last-update span:last-child,
.next-update span:last-child {
    font-weight: 600;
    color: #667eea;
}

.refresh-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn i {
    transition: transform 0.5s;
}

.refresh-btn:hover i {
    transform: rotate(180deg);
}

/* Loading Styles */
.loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #666;
    font-size: 1.1rem;
}

/* Error Message Styles */
.error-message {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #c33;
}

.error-message i {
    font-size: 1.5rem;
}

/* Venue Grid Styles */
.venue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.venue-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.venue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.venue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    gap: 10px;
}

.venue-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
}

.limit-time {
    font-size: 0.95rem;
    color: #ff6b6b;
    font-weight: 600;
    white-space: nowrap;
}

.race-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.no-race {
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 0.95rem;
}

.odds-table {
    width: 100%;
}

.odds-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.odds-row:last-child {
    border-bottom: none;
}

.boat-number {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.vote-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: #666;
}

.vote-tickets,
.vote-amount {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vote-tickets i,
.vote-amount i {
    font-size: 0.7rem;
    color: #999;
}

.vote-tickets span:last-child,
.vote-amount span:last-child {
    font-weight: 600;
    color: #333;
}

.odds-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.boat-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

/* 艇番カラー */
.boat-1 { background: #fff; color: #333; border: 2px solid #333; }
.boat-2 { background: #000; }
.boat-3 { background: #f00; }
.boat-4 { background: #00f; }
.boat-5 { background: #ff0; color: #333; }
.boat-6 { background: #0f0; color: #333; }

.odds-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    min-width: 100px;
    text-align: right;
}

.odds-value.high-odds {
    color: #f00;
}

.odds-value.low-odds {
    color: #00f;
}

/* Footer Styles */
.footer {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #666;
}

.footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header-info {
        flex-direction: column;
        align-items: stretch;
    }

    .update-info {
        flex-direction: column;
        gap: 10px;
    }

    .refresh-btn {
        width: 100%;
        justify-content: center;
    }

    .venue-grid {
        grid-template-columns: 1fr;
    }

    .odds-row {
        grid-template-columns: 100px 1fr auto;
        gap: 10px;
    }

    .vote-info {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.2rem;
    }

    .venue-name {
        font-size: 1.1rem;
    }

    .odds-value {
        font-size: 1rem;
    }

    .odds-row {
        grid-template-columns: 80px 1fr 60px;
        gap: 8px;
        font-size: 0.9rem;
    }

    .vote-info {
        font-size: 0.65rem;
    }

    .boat-number span {
        display: none;
    }
}
