/* LotteriaNazionale - Main Stylesheet */

:root {
    --primary-color: #1a237e;
    --secondary-color: #283593;
    --accent-color: #3949ab;
    --gold-color: #ffc107;
    --success-color: #4caf50;
    --purple-accent: #7b2cbf;
    --pink-accent: #e91e63;
    --cyan-accent: #00d4ff;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #e3f2fd, #f3e5f5, #fff3e0, #e8f5e9, #fce4ec, #e0f2f1);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    z-index: -1;
    opacity: 0.8;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

nav a.btn-primary,
nav a.btn-primary:hover,
nav a.btn-primary:visited,
nav a.btn-primary:active,
nav a.btn-primary:focus {
    color: white !important;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white !important;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

.btn-primary:visited,
.btn-primary:active,
.btn-primary:focus {
    color: white !important;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gold-color), #ffb300);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ffb300, var(--gold-color));
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--purple-accent) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: brightness(0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.8), rgba(40, 53, 147, 0.7), rgba(123, 44, 191, 0.8));
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
    opacity: 0.3;
    z-index: 0;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    margin-top: 2rem;
}

/* Weekly Drawings Section */
.weekly-drawings {
    padding: 4rem 2rem;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.prize-pool {
    text-align: center;
    background: linear-gradient(135deg, #ffffff, #e8eaf6);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(26, 35, 126, 0.2);
    margin-bottom: 3rem;
    border: 2px solid var(--accent-color);
    position: relative;
    overflow: hidden;
}

.prize-pool::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(57, 73, 171, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: float 15s linear infinite;
}

.prize-amount {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Game Strategy Cards */
.game-strategy {
    padding: 4rem 2rem;
}

.strategy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.strategy-card {
    background: linear-gradient(135deg, var(--bg-white), #f8f9ff);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
}

.strategy-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(26, 35, 126, 0.2);
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #ffffff, #e8eaf6);
}

.card-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--purple-accent));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(57, 73, 171, 0.3);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.card-level {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.card-features {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}

.card-features li {
    padding: 0.5rem 0;
    color: var(--text-dark);
}

.card-features li:before {
    content: "✓ ";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.card-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1.5rem 0;
}

.card-price-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d, #1a1a1a);
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    color: #ffffff;
    padding: 3rem 2rem 1rem;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-section p {
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.footer-section a {
    color: #ffffff !important;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.6);
    text-underline-offset: 3px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: #ffc107 !important;
    text-decoration-color: #ffc107;
    text-decoration-thickness: 2px;
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
}

.footer-badge {
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s;
    min-width: 120px;
    max-width: 140px;
    height: 80px;
}

.footer-badge:hover {
    transform: scale(1.05);
}

.footer-badge-img {
    width: 100%;
    height: 100%;
    max-width: 120px;
    max-height: 70px;
    object-fit: contain;
    display: block;
}

.footer-badge-text {
    font-size: 0.875rem;
    font-weight: 600;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    margin-top: 2rem;
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.checkbox-label,
.form-group label.checkbox-label {
    display: flex !important;
    margin-bottom: 0 !important;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"],
.form-group label.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    margin-top: 0.25rem !important;
    padding: 0 !important;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    transition: all 0.3s;
}

.checkbox-label input[type="checkbox"]:checked,
.form-group label.checkbox-label input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked::after,
.form-group label.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label span,
.form-group label.checkbox-label span {
    flex: 1;
    line-height: 1.5;
    user-select: none;
}

.form-group-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label-inline {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    margin: 0 !important;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label-inline input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    transition: all 0.3s;
}

.checkbox-label-inline input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label-inline input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-password-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .form-group-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forgot-password-link {
        align-self: flex-end;
    }
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input[type="date"] {
    color: var(--text-dark);
}

.form-group input[type="date"]:invalid::-webkit-datetime-edit {
    color: var(--text-light);
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Page Content */
.page-content {
    padding: 3rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.page-content h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.page-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Buy Tickets Page */
.ticket-selection-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    margin-top: 2rem;
}

.numbers-section {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.number-btn {
    aspect-ratio: 1;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
    transform: scale(1.05);
}

.number-btn.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--purple-accent));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.4);
    transform: scale(1.05);
}

.number-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.number-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.number-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.entry-summary {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.entry-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 500;
    color: var(--text-dark);
}

.summary-value {
    font-weight: 600;
    color: var(--primary-color);
}

.summary-input {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 150px;
}

.summary-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.summary-divider {
    height: 2px;
    background: var(--border-color);
    margin: 1rem 0;
}

.summary-total {
    font-size: 1.25rem;
    padding-top: 1.5rem;
}

.summary-total .summary-value {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 968px) {
    .ticket-selection-container {
        grid-template-columns: 1fr;
    }

    .entry-summary {
        position: static;
    }

    .numbers-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 640px) {
    .numbers-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Contact Page */
.official-details-section {
    margin: 3rem 0;
}

.official-details-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.official-details-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.official-details-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    font-family: serif;
}

.official-details-item:last-child {
    border-bottom: none;
}

.official-details-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.official-details-text {
    color: var(--text-dark);
    font-size: 1.125rem;
    line-height: 1.6;
}

.contact-info {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }

    .page-content {
        padding: 1.5rem 1rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .weekly-drawings {
        padding: 2rem 1rem;
    }

    .prize-pool {
        padding: 2rem 1.5rem;
    }

    .game-strategy {
        padding: 2rem 1rem;
    }

    .strategy-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .strategy-card {
        padding: 1.5rem;
    }

    .form-container {
        padding: 1.5rem;
        margin: 2rem auto;
    }

    .official-details-section {
        margin: 2rem 0;
    }

    .official-details-card {
        padding: 1.5rem;
    }

    .contact-info {
        padding: 1.5rem;
    }

    footer {
        padding: 2rem 1rem 1rem;
    }

    .footer-section {
        margin-bottom: 1.5rem;
    }

    .footer-badges {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        margin: 1.5rem 0;
    }

    .footer-badge {
        min-width: 100px;
        max-width: 120px;
        height: 70px;
        padding: 0.4rem;
    }

    .footer-badge-img {
        max-width: 100px;
        max-height: 60px;
    }

    .ticket-selection-container {
        gap: 1.5rem;
    }

    .numbers-section {
        padding: 1.5rem;
    }

    .entry-summary {
        padding: 1.5rem;
        position: static;
    }
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    position: relative;
    width: 30px;
    height: 30px;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.menu-toggle span:nth-child(1) {
    top: 6px;
}

.menu-toggle span:nth-child(2) {
    top: 13px;
}

.menu-toggle span:nth-child(3) {
    top: 20px;
}

.menu-toggle.active span:nth-child(1) {
    top: 13px;
    transform: translateX(-50%) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    top: 13px;
    transform: translateX(-50%) rotate(-45deg);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 4rem 1.5rem 1.5rem;
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        overflow-y: auto;
    }

    nav ul.active {
        display: flex;
    }
}
