/* 1. Imports */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;800&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 1);
    --text-main: #2d3436;
    --text-sub: #636e72;
    --accent: #0984e3;
    --shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
}

/* 2. UNIVERSAL FONT FORCE */
/* This forces Playfair Display onto absolutely everything */
*, html, body, input, button, select, textarea, span, div, a {
    font-family: 'Playfair Display', Georgia, serif !important;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    box-sizing: border-box;
}

/* 3. Header Styling */
.brand-title {
    font-size: clamp(2.5rem, 8vw, 3.8rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* 4. The Grid System (Desktop Fixed / Mobile Fluid) */
.grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding: 20px;
    box-sizing: border-box;
    justify-content: center;
}

/* 5. Crate Buttons */
.crate-btn {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border-radius: 28px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    box-sizing: border-box;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    flex-shrink: 0; 
}

@media (max-width: 768px) {
    .crate-btn {
        width: 100% !important;
        max-width: 320px;
        height: auto !important;
        aspect-ratio: 1 / 1;
    }
}

.crate-logo {
    flex: 1;
    width: 80%;
    max-height: 60%;
    object-fit: contain;
    margin-bottom: 15px;
}

.crate-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.crate-desc { font-size: 0.9rem; color: var(--text-sub); line-height: 1.3; }

/* 6. Admin & Login UI (Safety First) */
.admin-container, .login-wrapper {
    width: 95%;
    max-width: 1100px;
    margin: 40px auto;
    display: block !important; /* Ensures login form doesn't vanish into a flex-column void */
}

.login-wrapper {
    max-width: 400px;
    text-align: center;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

/* Force password/text inputs to be visible and standard */
input[type="text"], input[type="password"], input[type="number"] {
    display: block !important;
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: white !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.admin-card { 
    background: #fff; 
    border-radius: 24px; 
    padding: 35px; 
    margin-bottom: 30px; 
    box-shadow: var(--shadow); 
}

.admin-row {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 16px;
    margin-bottom: 12px;
    gap: 15px;
}

button {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    background: var(--accent);
    color: white;
}

.btn-danger { background: #ff7675; }
.btn-update { background: #00cec9; }

/* Secret Trigger - Keeping it strictly to the tiny corner */
.secret-admin-trigger { 
    position: fixed; 
    top: 0; 
    right: 0; 
    width: 20px; 
    height: 20px; 
    opacity: 0; 
    z-index: 9999; 
}