:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131a;
    --bg-card: #1a1a24;
    --accent-primary: #e8b86d;
    --accent-secondary: #c79a5b;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --border: rgba(232, 184, 109, 0.15);
    --shadow: rgba(232, 184, 109, 0.1);
    --success: #4ade80;
    --error: #f87171;
}

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

body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(232, 184, 109, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(232, 184, 109, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.01) 2px,
        rgba(255, 255, 255, 0.01) 4px
    );
    pointer-events: none;
    z-index: 1;
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* Header */
header {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    animation: fadeInDown 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-mark {
    display: inline-block;
    font-size: 5rem;
    margin-bottom: 30px;
    position: relative;
    filter: drop-shadow(0 0 40px rgba(232, 184, 109, 0.4));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(-2deg); }
    75% { transform: translateY(-5px) rotate(2deg); }
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 0.95;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 30px;
}

/* User Info */
.user-info {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.welcome {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.admin-badge {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logout-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.logout-link:hover {
    color: var(--accent-primary);
}

.admin-panel-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border: 1px solid rgba(232, 184, 109, 0.3);
    border-radius: 12px;
}

.admin-panel-link:hover {
    background: rgba(232, 184, 109, 0.1);
}

.auth-link {
    margin-top: 30px;
}

.login-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    padding: 12px 40px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px var(--shadow);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--shadow);
}

/* Decorative line */
.divider {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    margin: 60px auto;
    opacity: 0.6;
}

/* Services Grid */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    padding: 60px 0 120px;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(232, 184, 109, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(232, 184, 109, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 80px var(--shadow);
}

.service-number {
    position: absolute;
    top: 30px;
    right: 30px;
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(232, 184, 109, 0.08);
    line-height: 1;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-number {
    color: rgba(232, 184, 109, 0.15);
    transform: scale(1.1) rotate(5deg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 30px;
    display: inline-block;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-icon {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.service-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.service-url {
    display: inline-block;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-family: 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: rgba(232, 184, 109, 0.05);
    border-radius: 2px;
    border: 1px solid rgba(232, 184, 109, 0.1);
    position: relative;
    z-index: 1;
}

.public-badge, .private-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.public-badge {
    background: rgba(74, 222, 128, 0.1);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.private-badge {
    background: rgba(232, 184, 109, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(232, 184, 109, 0.2);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-link::after {
    content: '→';
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-link:hover::after {
    transform: translateX(6px);
}

/* Footer */
footer {
    text-align: center;
    padding: 80px 40px 60px;
    border-top: 1px solid var(--border);
    position: relative;
}

.footer-logo {
    font-size: 2rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

footer p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

footer p:first-of-type {
    margin-bottom: 10px;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 60px 50px;
    max-width: 480px;
    width: 100%;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-logo {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 30px rgba(232, 184, 109, 0.3));
}

.auth-card h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 0.95rem;
}

.error-message {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--error);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.success-message {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: var(--success);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.auth-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(232, 184, 109, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.auth-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'DM Sans', sans-serif;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}

.auth-footer {
    text-align: center;
}

.back-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-primary);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    header {
        padding: 60px 0 60px;
    }

    .services {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 40px 0 80px;
    }

    .service-card {
        padding: 40px 30px;
    }

    .service-number {
        font-size: 4rem;
        top: 20px;
        right: 20px;
    }

    .auth-card {
        padding: 40px 30px;
    }
}

html {
    scroll-behavior: smooth;
}
