@import url('https://fonts.googleapis.css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #ec4899;
    --background-start: #0f172a;
    --background-end: #1e1b4b;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--background-start), var(--background-end));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
}

/* Glassmorphism Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Big Display Number */
.queue-number-display {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    margin: 2rem 0;
    color: #fff;
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.5);
    transition: all 0.3s ease;
}

.queue-number-display.highlight {
    transform: scale(1.1);
    color: #fcd34d;
    text-shadow: 0 0 40px rgba(252, 211, 77, 0.8);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    width: 100%;
    margin-bottom: 1rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.5);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-danger {
    background: #ef4444;
    color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn-success {
    background: #10b981;
    color: white;
}
.btn-success:hover { background: #059669; }

/* Grid Layout for Admin/Display Info */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.info-card h3 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.info-card .value {
    font-size: 2.5rem;
    font-weight: 800;
}

.history-list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Responsiveness */
@media (max-width: 768px) {
    .glass-container {
        padding: 2rem;
    }
    h1 {
        font-size: 2rem;
    }
    .queue-number-display {
        font-size: 5rem;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Area Cetak (Print) */
.print-area {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }
    body {
        background: none;
        padding: 0;
    }
    .print-area, .print-area * {
        visibility: visible;
    }
    .print-area {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: #000;
        text-align: center;
        padding-top: 2rem;
    }
    .print-area h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    #printNumber {
        font-size: 6rem;
        font-weight: 800;
        margin: 1rem 0;
        border: 4px solid #000;
        padding: 1rem 3rem;
        border-radius: 16px;
    }
    #printDate {
        font-size: 1.2rem;
        color: #555;
    }
}
