/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c1810;
    background-color: #faf8f5;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    color: #8b5a3c;
}

h2 {
    font-size: 2rem;
    color: #6d4426;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
    color: #5a3419;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #d4a574, #b8956a);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c9985d, #a6834f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.4);
}

.btn-outline {
    background: transparent;
    color: #8b5a3c;
    border: 2px solid #8b5a3c;
}

.btn-outline:hover {
    background: #8b5a3c;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: #000;
}

/* Age Verification Modal */
.age-verification {
    text-align: center;
    padding: 20px;
}

.age-verification h2 {
    color: #dc3545;
    margin-bottom: 20px;
}

.age-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.age-buttons .btn {
    min-width: 150px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #f5f0ea, #ede4d8);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 2rem;
    margin: 0;
    color: #8b5a3c;
}

.tagline {
    font-size: 0.9rem;
    color: #6d4426;
    font-style: italic;
}

.navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.navigation a {
    text-decoration: none;
    color: #5a3419;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navigation a:hover {
    color: #8b5a3c;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #8b5a3c;
    margin: 3px 0;
    transition: 0.3s;
}

/* Responsible Gaming Bar */
.responsible-gaming-bar {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

.responsible-gaming-bar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.age-restriction {
    background: white;
    color: #dc3545;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.responsible-gaming-bar a {
    color: white;
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f4ef, #ede4d8);
    padding: 4rem 0;
}

.hero-content {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content h2 {
    font-size: 3rem;
    color: #8b5a3c;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: #6d4426;
    margin-bottom: 2rem;
}

.hero-disclaimer {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    padding: 15px;
    border-radius: 10px;
    color: #856404;
    font-size: 1.1rem;
}

/* Latest Results */
.latest-results {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.latest-results h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #8b5a3c;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.result-card {
    background: linear-gradient(135deg, #f8f4ef, #f0ebe4);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e6d7c7;
    text-align: center;
}

.result-card h4 {
    color: #8b5a3c;
    margin-bottom: 1rem;
}

.numbers {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.number {
    background: white;
    color: #8b5a3c;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid #d4a574;
}

.powerball {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.draw-date {
    color: #6d4426;
    font-size: 0.9rem;
}

/* Sections */
.how-to-play, .about, .faq {
    padding: 4rem 0;
}

.how-to-play {
    background: white;
}

.about {
    background: linear-gradient(135deg, #f8f4ef, #f0ebe4);
}

.faq {
    background: white;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.game-card {
    background: linear-gradient(135deg, #f8f4ef, #f0ebe4);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid #e6d7c7;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6d4426;
}

/* Important Notice */
.important-notice {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid #dc3545;
}

.important-notice h3 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.important-notice ul {
    list-style-position: inside;
    color: #856404;
}

.important-notice li {
    margin-bottom: 0.5rem;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text ul {
    list-style-position: inside;
    margin-left: 1rem;
}

.about-text li {
    margin-bottom: 0.5rem;
}

.responsible-gaming-resources {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.help-resources {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.resource {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f4ef, #f0ebe4);
    border-radius: 10px;
    border: 2px solid #e6d7c7;
}

.resource h4 {
    color: #8b5a3c;
    margin-bottom: 0.5rem;
}

.resource p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.resource a {
    color: #8b5a3c;
    text-decoration: none;
    font-weight: 500;
}

.resource a:hover {
    text-decoration: underline;
}

/* FAQ Section */
.faq-grid {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    background: linear-gradient(135deg, #f8f4ef, #f0ebe4);
    border-radius: 15px;
    border: 2px solid #e6d7c7;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    background: #8b5a3c;
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq-item h3:hover {
    background: #6d4426;
}

.faq-answer {
    padding: 1.5rem;
    background: white;
}

.faq-answer p {
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c1810, #1a0f08);
    color: #d4a574;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #f0ebe4;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d4a574;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #f0ebe4;
}

.age-notice {
    background: #dc3545;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    margin-top: 1rem;
    display: inline-block;
}

.footer-bottom {
    border-top: 1px solid #5a3419;
    padding-top: 2rem;
}

.disclaimer {
    background: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid #ffeaa7;
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    color: #a0845c;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #5a3419;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e6d7c7;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #8b5a3c;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
}

.form-note {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.form-note a {
    color: #8b5a3c;
    text-decoration: none;
}

.form-note a:hover {
    text-decoration: underline;
}

/* Message Overlay */
.message-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.message-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    text-align: center;
}

.close-message {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close-message:hover {
    color: #000;
}

#message-text {
    font-size: 1.1rem;
    color: #2c1810;
    margin-top: 20px;
}

.success-message {
    color: #28a745;
}

.error-message {
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-wrapper {
        flex-wrap: wrap;
    }
    
    .navigation {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .navigation.active {
        display: block;
    }
    
    .navigation ul {
        flex-direction: column;
        padding: 1rem 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-buttons {
        gap: 0.5rem;
    }
    
    .auth-buttons .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .age-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .responsible-gaming-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .numbers {
        justify-content: center;
    }
    
    .number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for accessibility */
.btn:focus,
input:focus,
.navigation a:focus {
    outline: 2px solid #8b5a3c;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
    
    .btn-outline {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

#message-text {
    font-size: 1.1rem;
    color: #2c1810;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-align: left;
}

.message-icon {
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.message-content {
    flex: 1;
    line-height: 1.6;
}

/* Стили для разных типов сообщений */
#message-text.message.success {
    color: #28a745;
}

#message-text.message.success .message-icon {
    color: #28a745;
}

#message-text.message.error {
    color: #dc3545;
}

#message-text.message.error .message-icon {
    color: #dc3545;
}

#message-text.message.warning {
    color: #ffc107;
}

#message-text.message.warning .message-icon {
    color: #ffc107;
}

#message-text.message.info {
    color: #17a2b8;
}

#message-text.message.info .message-icon {
    color: #17a2b8;
}

@media (max-width: 480px) {
    #message-text {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .message-icon {
        font-size: 2rem;
    }
}