/* ===========================================
   COLOR SCHEME
   =========================================== */
:root {
    --color-background: #0d0d14;
    --color-text: #fefefd;
    --color-text-muted: rgba(255, 255, 255, 0.5);
    --color-text-secondary: rgba(255, 255, 255, 0.9);
    --color-accent: #e94560;
    --color-accent-bg: rgba(233, 69, 96, 0.3);
    --color-tile-bg: rgba(255, 255, 255, 0.1);
    --color-tile-bg-hover: rgba(255, 255, 255, 0.2);
    --color-tile-border: rgba(255, 255, 255, 0.2);
}

/* ===========================================
   BASE STYLES
   =========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: var(--color-background);
    color: var(--color-text);
    overflow: hidden;
}

/* ===========================================
   SPACE ANIMATION
   =========================================== */
.space-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 500px;
    overflow: hidden;
    z-index: 1000;
}

.space-container.fade-out {
    animation: fadeOutSpace 0.5s ease-out forwards;
}

@keyframes fadeOutSpace {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    transform-style: preserve-3d;
}

/* ===========================================
   MAIN CONTENT
   =========================================== */
.main-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.main-content.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===========================================
   LOGO
   =========================================== */
.logo-container {
    position: absolute;
    top: 40px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-out 0.2s, transform 0.5s ease-out 0.2s;
}

.main-content.visible .logo-container {
    opacity: 1;
    transform: translateY(0);
}

.logo {
    height: 50px;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 1px;
}

/* ===========================================
   TILE
   =========================================== */
.tiles-row {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

.tile {
    background: var(--color-tile-bg);
    border-radius: 16px;
    padding: 40px 50px;
    backdrop-filter: blur(10px);
    width: 280px;
    min-height: 220px;
    border: 1px solid var(--color-tile-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: var(--color-tile-bg-hover);
}

.tile-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.tile-logo {
    height: 60px;
    margin-bottom: 20px;
}

.tile-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
}

.tile-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 10px;
}

/* ===========================================
   TYPEWRITER
   =========================================== */
.typewriter-container {
    text-align: center;
    width: 100%;
}

.typewriter-text {
    display: inline;
    font-size: 32px;
    font-weight: 300;
    color: var(--color-text);
    letter-spacing: 2px;
}

.cursor {
    display: inline;
    font-size: 32px;
    font-weight: 300;
    color: var(--color-accent);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

/* ===========================================
   LEGAL PAGES
   =========================================== */
.no-animation {
    overflow: auto;
}

.legal-content {
    max-width: 800px;
    width: 100%;
    padding: 40px;
    margin-top: 80px;
}

.legal-content h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--color-text);
}

.legal-content h2 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 8px;
    color: var(--color-accent);
}

.legal-content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.legal-content a {
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.legal-content a:hover {
    opacity: 0.7;
}

.logo-container.clickable,
a.logo-container {
    cursor: pointer;
    text-decoration: none;
}

/* ===========================================
   MOBILE RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    .logo-container {
        top: 20px;
        left: 20px;
        gap: 10px;
    }

    .logo {
        height: 35px;
    }

    .logo-text {
        font-size: 18px;
    }

    .tiles-row {
        gap: 20px;
    }

    .tile {
        padding: 30px 40px;
        border-radius: 12px;
        width: 240px;
        min-height: 200px;
    }

    .tile-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }

    .tile-logo {
        height: 50px;
        margin-bottom: 15px;
    }

    .tile-title {
        font-size: 22px;
    }

    .tile-subtitle {
        font-size: 12px;
    }

    .typewriter-text,
    .cursor {
        font-size: 24px;
    }

    .footer {
        bottom: 20px;
        gap: 20px;
    }

    .footer a {
        font-size: 13px;
    }

    .legal-content {
        padding: 20px;
        margin-top: 60px;
    }

    .legal-content h1 {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .legal-content h2 {
        font-size: 15px;
    }

    .legal-content p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }

    .logo-container {
        top: 15px;
        left: 15px;
        gap: 8px;
    }

    .logo {
        height: 30px;
    }

    .logo-text {
        font-size: 16px;
    }

    .tiles-row {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .tile {
        padding: 25px 30px;
        width: calc(100% - 30px);
        max-width: 280px;
        min-height: auto;
    }

    .tile-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }

    .tile-logo {
        height: 40px;
        margin-bottom: 12px;
    }

    .tile-title {
        font-size: 20px;
    }

    .typewriter-text,
    .cursor {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .footer {
        bottom: 15px;
        gap: 15px;
    }

    .footer a {
        font-size: 12px;
    }

    .legal-content {
        padding: 15px;
        margin-top: 50px;
    }

    .legal-content h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .legal-content h2 {
        font-size: 14px;
        margin-top: 20px;
    }

    .legal-content p {
        font-size: 12px;
    }
}
