/* Global CSS - Variables, Base Styles, and Shared Components */

:root {
    --primary: #2d5242;
    --accent: #00ff88;
    --bg: #ffffff;
    --bg-alternative: #f8f8f8;
    --surface: #ffffff;
    --border: #e0e0e0;
    --text: #1a1a1a;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* { 
    box-sizing: border-box; 
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; 
}

body {
    background-color: var(--bg-alternative);
    color: var(--text);
    margin: 0;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.hidden { display: none; }

h1 { 
    margin-top: 0; 
    color: var(--primary); 
    text-align: center; 
    margin-bottom: 1.5rem; 
}

h2 { 
    font-size: 1.2rem; 
    margin-bottom: 1rem; 
    color: var(--primary); 
}

/* Navigation (To switch views) */
.nav-toggle {
    background: var(--primary);
    padding: 0.25rem;
    border-radius: 50px;
    display: flex;
    gap: 0.25rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.nav-btn {
    border: none;
    background: transparent;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    transition: all 0.2s;
}

.nav-btn.active {
    background: var(--accent);
    color: var(--primary);
}

/* Container */
.container {
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 3rem;
    overflow: hidden;
}

@media (max-width: 600px) {
    .container {
        padding: 2rem 1.5rem;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    max-height: 94svh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-close:hover { color: #333; }

/* Success Overlay - Full Screen Celebration */
.success-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #2d5242 0%, #1e3a2d 50%, #0f1f18 100%);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease-out;
    overflow: hidden;
}

.success-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0,255,136,0.15) 0%, rgba(0,255,136,0.05) 30%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulse 3s ease-in-out infinite;
}

.success-overlay::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1200px;
    height: 1200px;
    background: 
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            transparent 0deg,
            transparent 8deg,
            rgba(0,255,136,0.03) 8deg,
            rgba(0,255,136,0.03) 10deg
        );
    transform: translate(-50%, -50%);
    animation: rotate 20s linear infinite;
    mask-image: radial-gradient(circle, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle, black 30%, transparent 70%);
}

.success-overlay.active {
    display: flex;
}

.success-content {
    text-align: center;
    color: white;
    animation: slideUp 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 1;
}

.success-icon {
    font-size: 8rem;
    margin-bottom: 1rem;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 0 30px rgba(0,255,136,0.5));
}

.success-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 40px rgba(0,255,136,0.3);
}

.success-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(0,255,136,0.2);
}

.success-close {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    font-family: 'DM Sans', sans-serif;
}

.success-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Animations */
@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

/* Version Number */
.version-number {
    position: fixed;
    font-size: 16px;
    bottom: 0;
    right: 0;
    color: rgba(0, 0, 0, 0.3);
    background-color: var(--bg-alternative);
    padding: 8px 15px;
    border-radius: 4px;
}
