@font-face {
    font-family: 'Sarasa Mono CL';
    src: url('/fonts/SarasaMonoCL-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

@keyframes fadeInOut1 {
    0%, 100% { opacity: 1; }
    33%, 66% { opacity: 0; }
}

@keyframes fadeInOut2 {
    0%, 100% { opacity: 0; }
    33% { opacity: 1; }
    66% { opacity: 0; }
}

@keyframes fadeInOut3 {
    0%, 33% { opacity: 0; }
    66% { opacity: 1; }
    100% { opacity: 0; }
}

body {
    font-family: 'Sarasa Mono CL', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.gradient-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gradient-layer-1 {
    background: radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.3), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.3), transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(20, 184, 166, 0.2), transparent 50%),
                linear-gradient(135deg, #10b981 0%, #059669 50%, #f97316 100%);
    animation: fadeInOut1 30s ease-in-out infinite;
}

.gradient-layer-2 {
    background: radial-gradient(circle at 80% 30%, rgba(249, 115, 22, 0.3), transparent 50%),
                radial-gradient(circle at 30% 70%, rgba(20, 184, 166, 0.3), transparent 50%),
                radial-gradient(circle at 60% 20%, rgba(251, 146, 60, 0.2), transparent 50%),
                linear-gradient(135deg, #f97316 0%, #10b981 50%, #059669 100%);
    animation: fadeInOut2 30s ease-in-out infinite;
}

.gradient-layer-3 {
    background: radial-gradient(circle at 50% 80%, rgba(20, 184, 166, 0.3), transparent 50%),
                radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.3), transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(16, 185, 129, 0.2), transparent 50%),
                linear-gradient(135deg, #059669 0%, #f97316 50%, #10b981 100%);
    animation: fadeInOut3 30s ease-in-out infinite;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.4s ease-out;
    z-index: 10;
}

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

.modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    animation: modalSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: iconBounce 1s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.modal-headline {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.modal-subheadline {
    font-size: 16px;
    font-weight: 400;
    color: #64748b;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

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

.input-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.input-wrapper:focus-within {
    border-color: #1a202c;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.modal-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 16px;
    border: none;
    background: transparent;
    outline: none;
    color: #1a202c;
    font-family: 'Sarasa Mono CL', monospace;
    text-align: center;
    transition: font-size 0.2s ease-in-out;
}

.modal-input::placeholder {
    color: #94a3b8;
}

.modal-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-button {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    font-family: 'Sarasa Mono CL', monospace;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-button:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.modal-button:active:not(:disabled) {
    transform: translateY(0);
}

.modal-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.message {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 16px;
    text-align: center;
    animation: messageSlideIn 0.3s ease-out;
}

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

.message.success {
    background: linear-gradient(135deg, #d4f4dd 0%, #b8f1cc 100%);
    color: #166534;
    border: 1px solid #86efac;
}

.message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.modal-privacy {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
    margin-top: 20px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .modal {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .modal-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }

    .modal-icon svg {
        width: 48px;
        height: 48px;
    }

    .modal-headline {
        font-size: 26px;
    }

    .modal-subheadline {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .input-wrapper {
        flex-direction: column;
        gap: 8px;
    }

    .modal-button {
        width: 100%;
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Landing Page */
.landing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    z-index: 10;
    text-align: center;
    gap: 16px;
}

.landing-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.3));
    animation: float 4s ease-in-out infinite;
}

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

.landing-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.15em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    margin: 0;
}

.landing-tagline {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    margin: 8px 0 24px;
}

.landing-socials {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.social-link:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.landing-cta {
    display: inline-block;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    text-decoration: none;
    font-family: 'Sarasa Mono CL', monospace;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.landing-cta:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Modal back button */
.modal-back {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #64748b;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.modal-back:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    color: #1a202c;
}

/* 404 Page */
.not-found {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    text-align: center;
    gap: 16px;
}

.not-found h1 {
    font-size: 120px;
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    margin: 0;
    line-height: 1;
}

.not-found p {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 32px;
}

/* Responsive adjustments for landing */
@media (max-width: 600px) {
    .landing-logo {
        width: 140px;
        height: 140px;
    }

    .landing-title {
        font-size: 36px;
    }

    .landing-tagline {
        font-size: 16px;
    }

    .landing-cta {
        padding: 14px 32px;
        font-size: 16px;
    }

    .not-found h1 {
        font-size: 80px;
    }
}
