/* =====================================
   Employee Registration Kiosk System
   Premium Design with Glassmorphism
===================================== */

:root {
    --primary-cyan: #00d9ff;
    --primary-green: #00ff88;
    --success-color: #00ff88;
    --error-color: #ff4757;
    --bg-dark: #0a0a1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 40px rgba(0, 217, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    overflow: hidden;
    color: var(--text-primary);
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(0, 217, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(100, 50, 200, 0.1) 0%, transparent 60%),
        linear-gradient(180deg, #0a0a1a 0%, #1a1a3a 100%);
    z-index: -1;
}

.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300d9ff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(60px, 60px);
    }
}

/* Container */
.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Screens */
.screen {
    display: none;
    width: 100%;
    max-width: 1200px;
    animation: fadeIn 0.4s ease-out;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================
   Scan Screen
===================================== */
.scan-screen {
    position: relative;
    text-align: center;
}

.sync-panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sync-status {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    backdrop-filter: blur(10px);
}

.sync-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-green {
    background: rgba(0, 255, 136, 0.14);
    border: 1px solid rgba(0, 255, 136, 0.35);
    color: #a5ffcf;
}

.status-green .sync-dot {
    background: #00ff88;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
}

.status-orange {
    background: rgba(255, 165, 2, 0.16);
    border: 1px solid rgba(255, 165, 2, 0.5);
    color: #ffd894;
}

.status-orange .sync-dot {
    background: #ffa502;
    box-shadow: 0 0 8px rgba(255, 165, 2, 0.7);
}

.status-red {
    background: rgba(255, 71, 87, 0.16);
    border: 1px solid rgba(255, 71, 87, 0.5);
    color: #ffc0c6;
}

.status-red .sync-dot {
    background: #ff4757;
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.75);
}

.sync-now-btn {
    padding: 0.48rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 217, 255, 0.45);
    background: rgba(0, 217, 255, 0.16);
    color: #d5f8ff;
    font-family: 'Prompt', sans-serif;
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sync-now-btn:hover:not(:disabled) {
    background: rgba(0, 217, 255, 0.26);
    transform: translateY(-1px);
}

.sync-now-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.logo-section {
    margin-bottom: 3rem;
}

.logo-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Scan Box */
.scan-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem 4rem;
    box-shadow: var(--shadow-glow);
    max-width: 600px;
    width: 100%;
}

.scan-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    color: var(--primary-cyan);
}

.scan-icon .scan-line {
    animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {

    0%,
    100% {
        transform: translateY(-10px);
        opacity: 0.5;
    }

    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

.scan-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.scan-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.scan-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    font-size: 1.5rem;
    font-family: 'Prompt', sans-serif;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.3s ease;
}

.scan-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.scan-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* DateTime Display */
.datetime-display {
    margin-top: 3rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* =====================================
   Success Screen
===================================== */
.result-screen {
    padding: 2rem;
}

.result-content {
    display: flex;
    width: 100%;
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-center {
    flex: 1;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
}

.success-screen .result-center {
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.15);
}

/* DateTime Display Box */
.result-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.datetime-display-box {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 217, 255, 0.2));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 255, 136, 0.4);
    border-radius: 24px;
    padding: 2.5rem 3.5rem;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.2);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 40px rgba(0, 255, 136, 0.2);
    }

    50% {
        box-shadow: 0 0 80px rgba(0, 255, 136, 0.4);
    }
}

.scan-datetime-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scan-time {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--success-color), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.scan-date {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 0.5rem;
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.status-badge.success {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-badge svg {
    width: 36px;
    height: 36px;
}

.employee-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-row.name-row .info-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Table Display */
.result-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-display {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 217, 255, 0.2));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(0, 255, 136, 0.4);
    border-radius: 24px;
    padding: 3rem 5rem;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.2);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 40px rgba(0, 255, 136, 0.2);
    }

    50% {
        box-shadow: 0 0 80px rgba(0, 255, 136, 0.4);
    }
}

.table-label {
    display: block;
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.table-number {
    display: block;
    font-size: 8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--success-color), var(--primary-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* =====================================
   Error Screen
===================================== */
.error-screen .result-left {
    border-color: rgba(255, 71, 87, 0.3);
    box-shadow: 0 0 40px rgba(255, 71, 87, 0.15);
}

.error-content {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: 24px;
    box-shadow: 0 0 40px rgba(255, 71, 87, 0.15);
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
}

.error-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    color: var(--error-color);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* =====================================
   Progress Bar
===================================== */
.progress-container {
    width: 100%;
    max-width: 600px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-green));
    border-radius: 4px;
}

.progress-bar.error {
    background: linear-gradient(90deg, var(--error-color), #ff6b7a);
}

.auto-reset-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* =====================================
   Responsive Design
===================================== */
@media (max-width: 900px) {
    .result-content {
        flex-direction: column;
    }

    .table-display {
        padding: 2rem 3rem;
    }

    .table-number {
        font-size: 6rem;
    }

    .title {
        font-size: 2.2rem;
    }

    .scan-box {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .scan-title {
        font-size: 1.5rem;
    }

    .scan-input {
        font-size: 1.2rem;
        padding: 1rem;
    }

    .table-number {
        font-size: 5rem;
    }

    .info-row.name-row .info-value {
        font-size: 1.5rem;
    }

    .sync-panel {
        position: static;
        margin-bottom: 1rem;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 600px;
    }

    .sync-status,
    .sync-now-btn {
        width: 100%;
        justify-content: center;
    }
}