@font-face {
    font-family: 'Playfair Display';
    src: url('fonts/PlayfairDisplay.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

html {
    overflow-x: hidden;
    max-width: 100%;
    min-height: 100%;
    background: #000000;
}

:root {
    --primary: #E3DF99;
    --accent: #d4af37;
    --text-light: #f5f5f5;
    --surface: rgba(26, 26, 26, 0.85);
    --border: rgba(227, 223, 153, 0.25);
}

body {
    font-family: 'Playfair Display', serif;
    background: #000000;
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

p,
h1,
h2,
label {
    font-weight: 400;
}

/* Background */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    height: 100%;
    z-index: 0;
    background: #000000;
    pointer-events: none;
    overflow: hidden;
    contain: layout style paint;
}

.star {
    position: absolute;
    background: #ffffff;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
    filter: blur(0.5px);
}

.star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: #ffffff;
    filter: blur(2px);
    opacity: 0.6;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.shooting-star {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffffff);
    animation: shoot 3s ease-out forwards;
    filter: drop-shadow(0 0 6px #ffffff);
    transform-origin: left center;
}

.shooting-star::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px #ffffff;
}

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

@keyframes shoot {
    0% { transform: translateX(0) translateY(0) rotate(45deg); opacity: 1; width: 0; }
    10% { width: 100px; }
    100% { transform: translateX(300px) translateY(300px) rotate(45deg); opacity: 0; width: 100px; }
}

/* Nav */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100vw;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 75px;
    width: auto;
    transition: transform 0.3s ease;
}

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

/* Sign-in */
.signin-wrap {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.25rem 3rem;
}

.signin-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 2rem 2.25rem;
    box-shadow: 0 0 40px rgba(227, 223, 153, 0.08);
    backdrop-filter: blur(12px);
}

.signin-card h1 {
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    color: var(--primary);
    text-align: center;
    margin-bottom: 0.35rem;
    text-shadow: 0 0 20px rgba(227, 223, 153, 0.35);
}

.signin-sub {
    text-align: center;
    font-size: 0.95rem;
    color: rgba(245, 245, 245, 0.65);
    margin-bottom: 1.75rem;
}

.signin-notice {
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary);
    background: rgba(227, 223, 153, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.field {
    margin-bottom: 1.25rem;
}

.field label {
    display: block;
    font-size: 0.9rem;
    color: rgba(245, 245, 245, 0.85);
    margin-bottom: 0.4rem;
}

.field input {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.45);
    color: var(--text-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder {
    color: rgba(245, 245, 245, 0.35);
}

.field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(227, 223, 153, 0.2);
}

.signin-submit {
    width: 100%;
    margin-top: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #0d0d0d;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.signin-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 24px rgba(227, 223, 153, 0.35);
}

.signin-submit:active {
    transform: translateY(0);
}

.signin-hint {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(245, 245, 245, 0.45);
}

@media (max-width: 768px) {
    .logo img {
        height: 60px;
    }

    .star {
        animation: none;
        opacity: 0.5;
    }

    .signin-card {
        padding: 1.5rem 1.25rem 1.75rem;
    }
}
