/* Reset & Global Styles */
:root {
    --bg-gradient: linear-gradient(180deg, #020813 0%, #06152d 50%, #0c2347 100%);
    --primary-color: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.4);
    --secondary-color: #4facfe;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --glass-bg: rgba(10, 25, 47, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Full-screen Interactive Aquarium Background */
.aquarium-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    pointer-events: auto; /* Allow clicks on background */
    cursor: pointer;
}

/* Water Ripple effect when clicked */
.ripple {
    position: absolute;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: ripple-effect 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    opacity: 0.8;
}

@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
    }
}

/* Fish food element */
.food-flake {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffb703;
    border-radius: 50%;
    box-shadow: 0 0 8px #ffb703;
    pointer-events: none;
    z-index: 2;
    animation: sway 2s ease-in-out infinite alternate;
}

@keyframes sway {
    0% { transform: translateX(0px); }
    100% { transform: translateX(10px); }
}

/* Floating Bubble styling */
.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    bottom: -50px;
    animation: rise var(--bubble-duration, 8s) linear infinite;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(0.6);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-110vh) scale(1);
        opacity: 0;
    }
}

/* Fish DOM element styling */
.fish {
    position: absolute;
    z-index: 3;
    pointer-events: none;
    transition: transform 0.1s linear; /* Smooth orientation transitions */
    transform-origin: center center;
}

.fish-body {
    animation: fish-swim-wiggle 0.3s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 10px var(--fish-glow, var(--primary-glow)));
}

@keyframes fish-swim-wiggle {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

/* +1 float up text when fish eats food */
.eat-indicator {
    position: absolute;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
    z-index: 4;
    animation: float-up-fade 1s ease-out forwards;
}

@keyframes float-up-fade {
    0% {
        transform: translate(-50%, -10px);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -40px);
        opacity: 0;
    }
}

/* Main Content Layout */
.content-wrapper {
    position: relative;
    z-index: 10; /* Float above aquarium */
    pointer-events: none; /* Let clicks pass through to aquarium by default */
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Enable pointer events specifically for UI cards and headers */
.header, .hero-card, .info-grid, .footer {
    pointer-events: auto;
}

/* Header */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon path {
    filter: drop-shadow(0 0 8px var(--primary-color));
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero glassmorphism card */
.hero-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    margin-bottom: 2.5rem;
    animation: fadeInDown 1s ease-out;
}

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

.hero-card h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Statistics */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    min-width: 130px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-glow);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.instructions {
    background: rgba(0, 242, 254, 0.05);
    border-left: 3px solid var(--primary-color);
    padding: 0.75rem 1.25rem;
    border-radius: 4px 12px 12px 4px;
    margin-bottom: 2.25rem;
    text-align: left;
    font-size: 0.95rem;
    color: #e2e8f0;
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    outline: none;
}

.btn-icon {
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #020813;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 242, 254, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 600px;
    width: 100%;
    margin-bottom: 4rem;
}

.info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.info-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.info-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Legal Cards & Pages */
.legal-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 840px;
    width: 100%;
    text-align: left;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.8s ease-out;
}

/* App badge and purpose box for OAuth Verification */
.app-badge {
    display: inline-block;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--primary-color);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: 0.03em;
}

.purpose-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-left: 4px solid var(--primary-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

.purpose-box h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.purpose-box p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #e2e8f0;
    margin-bottom: 0.75rem;
}

.purpose-box p:last-child {
    margin-bottom: 0;
}

.header-nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.sanctuary-banner {
    width: 100%;
    max-width: 840px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 2.5rem;
    text-align: center;
    pointer-events: auto;
}

.sanctuary-content h3 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.sanctuary-content p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.legal-card h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}

.legal-content h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-content p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #e2e8f0;
    margin-bottom: 1.2rem;
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

.legal-content li {
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-content a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.legal-content code {
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary-color);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.legal-actions {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

/* Footer */
.footer {
    width: 100%;
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-nav {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .content-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .hero-card {
        padding: 2rem 1.5rem;
    }
    
    .hero-card h1 {
        font-size: 2.2rem;
    }
    
    .cta-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}
