@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1a237e;
    /* Deep Indigo */
    --primary-light: #534bae;
    --primary-dark: #000051;
    --secondary: #ffc107;
    /* Amber/Gold */
    --accent: #f44336;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --container-max: 1100px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 95%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 1.2rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-header a {
    text-decoration: none;
    color: white;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.2s;
    opacity: 0.9;
}

.main-nav a:hover {
    opacity: 1;
    color: var(--secondary);
}

/* Main Content */
main {
    padding: 40px 0;
}

.intro-text h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.intro-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Time Buttons */
.time-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
    min-width: 200px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.btn-1pm {
    background-color: #ff9800;
}

.btn-6pm {
    background-color: #2196f3;
}

.btn-8pm {
    background-color: #4caf50;
}

/* SEO & Info Content */
.seo-content {
    background: var(--bg-card);
    padding: 40px;
    margin-top: 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.seo-content h2,
.seo-content h3 {
    color: var(--primary-dark);
    font-weight: 700;
}

.seo-content h2 {
    font-size: 1.8rem;
    margin-top: 0;
}

.seo-content h3 {
    font-size: 1.4rem;
    margin-top: 30px;
}

/* Result Display */
#result-area {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: 30px;
}

.result-card {
    border: 1px solid #eee;
    border-radius: var(--radius);
    margin-bottom: 30px;
    overflow: hidden;
}

.result-card h2 {
    background: #f8f9fa;
    margin: 0;
    padding: 15px;
    font-size: 1.25rem;
    border-bottom: 1px solid #eee;
    color: var(--primary);
}

canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}

/* Weekly Chart Grid */
.weekly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.day-card {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.2s;
}

.day-card:hover {
    border-color: var(--primary-light);
}

.day-card h4 {
    margin: 0 0 15px 0;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    border-left: 4px solid var(--secondary);
    padding-left: 10px;
}

.draw-entry {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f7fafc;
}

.draw-entry:last-child {
    border-bottom: none;
}

.draw-time {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.draw-name {
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Footer */
.main-footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 40px;
    margin-top: 80px;
}

.main-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.main-footer a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
}

.main-footer a:hover {
    color: var(--secondary);
}

/* Loading States */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .intro-text h1 {
        font-size: 1.75rem;
    }

    .btn {
        width: 100%;
        max-width: 100% !important;
    }

    .seo-content {
        padding: 25px;
    }

    .main-nav ul {
        gap: 15px;
    }
}