/* Global Styles */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6b8cc7;
    --accent-color: #ff6b6b;
    --success-color: #4ecdc4;
    --warning-color: #ffbe0b;
    --background-color: #f8f9fa;
    --text-color: #333;
    --light-text: #6c757d;
    --border-color: #dee2e6;
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

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

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

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--light-text);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a5a85;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.25rem;
}

/* Navbar */
.navbar {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.sudoku-icon {
    font-size: 2rem;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="10" height="10" fill="%234a6fa5" fill-opacity="0.05" x="0" y="0"/><rect width="10" height="10" fill="%234a6fa5" fill-opacity="0.05" x="20" y="20"/><rect width="10" height="10" fill="%234a6fa5" fill-opacity="0.05" x="40" y="40"/><rect width="10" height="10" fill="%234a6fa5" fill-opacity="0.05" x="60" y="60"/><rect width="10" height="10" fill="%234a6fa5" fill-opacity="0.05" x="80" y="80"/></svg>');
    z-index: 0;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    line-height: 1.1;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: var(--light-text);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.sudoku-preview {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transform: rotate(2deg);
    transition: var(--transition);
}

.sudoku-preview:hover {
    transform: rotate(0deg) scale(1.05);
}

.sudoku-grid-preview {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 1px;
    background-color: #ddd;
    border-radius: 5px;
    padding: 2px;
    width: 300px;
    height: 300px;
    position: relative;
}

.sudoku-grid-preview::before {
    content: '';
    position: absolute;
    width: calc(33.333% - 4px);
    height: calc(33.333% - 4px);
    border: 2px solid var(--primary-color);
    border-radius: 3px;
    top: 2px;
    left: 2px;
    pointer-events: none;
}

.sudoku-grid-preview::after {
    content: '';
    position: absolute;
    width: calc(33.333% - 4px);
    height: calc(33.333% - 4px);
    border: 2px solid var(--primary-color);
    border-radius: 3px;
    bottom: 2px;
    right: 2px;
    pointer-events: none;
}

.sudoku-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    font-weight: 600;
    font-size: 12px;
    color: var(--primary-color);
    border-radius: 2px;
}

.sudoku-cell:not(:empty) {
    background-color: #f0f5ff;
}

/* Features Section */
.features {
    padding: 100px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: #f0f5ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-title {
    margin-bottom: 15px;
    color: var(--text-color);
}

/* How to Play Section */
.how-to-play {
    padding: 100px 0;
    background-color: var(--background-color);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.steps {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 24px;
    top: 60px;
    width: 2px;
    height: calc(100% + 20px);
    background-color: var(--primary-color);
    opacity: 0.2;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
    z-index: 1;
}

.step-content h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Benefits Section */
.benefits {
    padding: 6rem 0;
    background-color: #f9f9f9;
}

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

.benefit-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.benefits-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.stat {
    text-align: center;
    min-width: 200px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: #666;
}

/* Tips Section */
.tips {
    padding: 6rem 0;
    background-color: white;
}

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

.tip-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
}

.tip-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tip-card i {
    font-size: 1.3rem;
}

/* Reviews Section */
.reviews {
    padding: 6rem 0;
    background-color: #f9f9f9;
}

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

.review-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.review-rating {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.review-text {
    font-style: italic;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.review-author {
    text-align: right;
}

.author-name {
    font-weight: 600;
    color: var(--text-color);
}

.author-location {
    font-size: 0.9rem;
    color: #888;
}

/* Mini Sudoku Demo Section */
.mini-demo {
    padding: 6rem 0;
    background-color: white;
}

.mini-sudoku-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.mini-sudoku-grid {
    display: grid;
    grid-template-columns: repeat(4, 60px);
    grid-template-rows: repeat(4, 60px);
    gap: 2px;
    background-color: #333;
    padding: 5px;
    border-radius: 5px;
}

.mini-sudoku-cell {
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    border-radius: 3px;
}

.mini-demo-actions {
    text-align: center;
    max-width: 400px;
}

.mini-demo-actions p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

.cta .btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.cta .btn-primary:hover {
    background-color: #f0f5ff;
}

/* Footer */
.footer {
    background-color: #333;
    color: white;
    padding: 50px 0 30px;
}

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

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    text-decoration: none;
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Game Page Styles */
.game-page {
    padding: 120px 0 100px;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
}

.game-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.difficulty-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.difficulty-btn.active,
.difficulty-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.game-stats {
    display: flex;
    gap: 30px;
    font-size: 1.25rem;
    font-weight: 600;
}

.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1px;
    background-color: #333;
    border: 3px solid #333;
    border-radius: 10px;
    margin-bottom: 30px;
}

.sudoku-grid .row {
    display: contents;
}

.sudoku-grid .cell {
    width: 50px;
    height: 50px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 2px;
}

.sudoku-grid .cell:nth-child(3n) {
    border-right: 2px solid #333;
}

.sudoku-grid .cell:nth-child(9n) {
    border-right: none;
}

.sudoku-grid .row:nth-child(3n) .cell {
    border-bottom: 2px solid #333;
}

.sudoku-grid .row:nth-child(9n) .cell {
    border-bottom: none;
}

.sudoku-grid .cell.filled {
    color: var(--primary-color);
    font-weight: 700;
    background-color: #f0f5ff;
}

.sudoku-grid .cell.user-input {
    color: var(--text-color);
}

.sudoku-grid .cell.selected {
    background-color: var(--warning-color) !important;
    color: white;
}

.sudoku-grid .cell.error {
    background-color: #ffebee;
    color: var(--accent-color);
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 200px;
    margin: 0 auto;
}

.number-btn {
    width: 60px;
    height: 60px;
    background-color: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary-color);
}

.number-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

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

/* About Page */
.about-page {
    padding: 120px 0 100px;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.about-section {
    background-color: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--card-shadow);
}

.about-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.about-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Contact Page */
.contact-page {
    padding: 120px 0 100px;
}

.contact-info {
    background-color: white;
    border-radius: 15px;
    padding: 50px;
    box-shadow: var(--card-shadow);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
}

.contact-email {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
    transition: var(--transition);
}

.contact-email:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Privacy Policy & Terms of Service */
.policy-page {
    padding: 120px 0 100px;
}

.policy-content {
    background-color: white;
    border-radius: 15px;
    padding: 50px;
    box-shadow: var(--card-shadow);
}

.policy-content h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
}

.policy-content h2 {
    color: var(--text-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.policy-content h3 {
    color: var(--light-text);
    margin-top: 25px;
    margin-bottom: 15px;
}

.policy-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.policy-content li {
    margin-bottom: 10px;
    color: var(--light-text);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .sudoku-grid .cell {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .number-btn {
        width: 50px;
        height: 50px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 1.1rem;
    }
    
    .sudoku-grid .cell {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .sudoku-grid-preview {
        width: 250px;
        height: 250px;
    }
    
    .sudoku-cell {
        font-size: 10px;
    }
    
    .policy-content,
    .contact-info,
    .about-section {
        padding: 30px 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.4s;
}