:root {
    --primary-color: #4A4DE7;
    --secondary-color: #4CD964;
    --accent-color: #FFD700;
    --danger-color: #FF3B30;
    --warning-color: #FF9500;
    --dark-bg: #1A1A2E;
    --darker-bg: #16213E;
    --card-bg: #2A2A4E;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.2);
    --transition-speed: 0.3s;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Neural Network Background */
.neural-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.neural-network {
    width: 100%;
    height: 100%;
    opacity: 0.05;
}

.node {
    fill: var(--primary-color);
    animation: pulse 3s infinite;
}

.link {
    stroke: var(--primary-color);
    stroke-width: 1;
    opacity: 0.4;
    animation: fadeLink 5s infinite;
}

@keyframes pulse {
    0% { r: 3; }
    50% { r: 5; }
    100% { r: 3; }
}

@keyframes fadeLink {
    0% { opacity: 0.2; }
    50% { opacity: 0.6; }
    100% { opacity: 0.2; }
}

/* Header */
header {
    background: linear-gradient(135deg, var(--dark-bg), var(--darker-bg));
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    padding: 8rem 0 4rem;
    text-align: center;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    animation: floatAnimation 3s ease-in-out infinite;
    border-radius: 28px;
}

@keyframes floatAnimation {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.tagline {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-container svg {
    position: relative;
    display: block;
    width: 100%;
    height: 80px;
}

/* Sections */
.section {
    background: linear-gradient(135deg, rgba(42, 42, 78, 0.8), rgba(26, 26, 46, 0.9));
    border-radius: 20px;
    padding: 40px;
    margin: 60px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.mission .section-accent {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.features .section-accent {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

.games .section-accent {
    background: linear-gradient(90deg, var(--warning-color), var(--primary-color));
}

.cta .section-accent {
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
}

h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

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

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: rgba(42, 45, 74, 0.3);
    border-radius: 16px;
    padding: 30px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

.icon-container {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(74, 77, 231, 0.15);
    border: 2px solid rgba(74, 77, 231, 0.3);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.feature-card:nth-child(1) .icon-container {
    background: rgba(74, 77, 231, 0.15);
    border-color: rgba(74, 77, 231, 0.3);
}

.feature-card:nth-child(2) .icon-container {
    background: rgba(76, 217, 100, 0.15);
    border-color: rgba(76, 217, 100, 0.3);
}

.feature-card:nth-child(3) .icon-container {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
}

.feature-card:nth-child(4) .icon-container {
    background: rgba(255, 149, 0, 0.15);
    border-color: rgba(255, 149, 0, 0.3);
}

.feature-icon {
    width: 30px;
    height: 30px;
    color: var(--text-primary);
}

.feature-card:nth-child(1) .feature-icon {
    color: var(--primary-color);
}

.feature-card:nth-child(2) .feature-icon {
    color: var(--secondary-color);
}

.feature-card:nth-child(3) .feature-icon {
    color: var(--accent-color);
}

.feature-card:nth-child(4) .feature-icon {
    color: var(--warning-color);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Game Cards */
.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.game-card {
    background: linear-gradient(135deg, var(--dark-bg), var(--card-bg));
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.game-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(45deg);
    z-index: 1;
    transition: all 0.6s ease;
}

.game-card:hover::before {
    animation: shine 1.5s forwards;
}

@keyframes shine {
    0% {
        transform: rotate(45deg) translateY(-100%);
    }
    100% {
        transform: rotate(45deg) translateY(100%);
    }
}

.game-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.game-image img, 
.game-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-image img,
.game-card:hover .game-image svg {
    transform: scale(1.05);
}

.memory-train {
    background: linear-gradient(135deg, #16213E, #1A1A2E);
}

.game-info {
    padding: 24px;
    position: relative;
}

.pill-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.pill-badge.coming-soon {
    background: var(--warning-color);
}

.game-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.game-info p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.game-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10; /* Higher z-index to ensure it's clickable */
    min-height: 44px;
}

.game-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    background: #5a5df0;
}

.game-button.disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    box-shadow: none;
}

.game-button.disabled:hover {
    transform: none;
}

/* CTA section */
.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all var(--transition-speed) ease;
    min-width: 180px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.cta-button:hover::before {
    transform: translateX(0);
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary-color), #3a3db7);
    color: white;
}

.cta-button.primary:hover {
    background: linear-gradient(135deg, #3a3db7, var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover {
    background: rgba(74, 77, 231, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background: var(--dark-bg);
    position: relative;
    padding: 60px 0 30px;
    margin-top: 100px;
}

.footer-wave {
    position: absolute;
    top: -80px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-logo .logo {
    width: 60px;
    height: 60px;
}

.footer-logo h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
    font-size: 1rem;
}

.footer-link:hover {
    color: var(--primary-color);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2A2A4E, #1A1A2E);
    margin: 5% auto;
    width: 90%;
    max-width: 700px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    padding: 30px;
    position: relative;
    animation: modalFadeIn 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

.close {
    position: absolute;
    right: 25px;
    top: 25px;
    color: var(--text-secondary);
    font-size: 35px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.close:hover,
.close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 2rem;
}

.modal-content h3 {
    color: var(--text-primary);
    margin: 25px 0 15px;
    font-size: 1.5rem;
}

.modal-content p, 
.modal-content li {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.6;
}

.modal-content ul {
    margin-left: 25px;
    margin-bottom: 20px;
}

.modal-content li {
    margin-bottom: 10px;
}

/* Form Styles */
.deletion-form {
    background: rgba(26, 26, 46, 0.5);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input[type="email"],
.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(42, 42, 78, 0.5);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input[type="email"]:focus,
.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 77, 231, 0.3);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-group.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.form-group input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 5px;
}

.checkbox-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.submit-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

.submit-button:hover {
    background: #5a5df0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(74, 77, 231, 0.3);
}

#confirmationMessage {
    background: rgba(76, 217, 100, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    border-radius: 10px;
    margin: 25px 0;
}

#confirmationMessage h3 {
    color: var(--secondary-color);
    margin-top: 0;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Success Animation */
.success-animation {
    animation: successPulse 1.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Entrance Animations */
.section.active {
    opacity: 1;
    transform: translateY(0);
}

.section:not(.active) {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .section {
        padding: 30px;
        margin: 40px 0;
    }
    
    .games-container {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
    }
    
    .game-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .section {
        padding: 20px;
        margin: 30px 0;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .feature-card {
        padding: 20px;
    }
}

/* Input focus state */
.input-focused label {
    color: var(--primary-color);
}

/* Animation for floating elements */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Page loader animation */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 77, 231, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(74, 77, 231, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(74, 77, 231, 0);
    }
}

.app-store-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.google-play-badge {
    height: 60px;
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 22px; /* Increased border radius for more rounded corners */
    transition: transform 0.3s ease;
}

.footer-title {
    font-size: 2rem;
    margin: 10px 0;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 8s ease infinite;
    background-size: 200% 200%;
}

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

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.store-badge {
    height: 40px;
    transition: transform var(--transition-speed) ease;
}

.google-play-badge {
    height: 60px;
}

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

@media (max-width: 768px) {
    .footer-top {
        margin-bottom: 20px;
    }
    
    .footer-title {
        font-size: 1.8rem;
    }
    
    .footer-logo-img {
        width: 70px;
        height: 70px;
    }
}

.game-info {
    position: relative;
    z-index: 5;
}

.game-card, .game-info {
    pointer-events: auto !important;
}