:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --btn-gradient: linear-gradient(45deg, #ff6b6b, #feca57);
    --text-light: #ffffff;
    --text-dark: #2d3436;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    color: var(--text-light);
}

/* Glassmorphic Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.3s ease;
    color: var(--text-light);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Glass Input Fields */
.glass-input {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: var(--text-light) !important;
    border-radius: 12px !important;
    padding: 10px 15px !important;
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
    outline: none;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Glass Table */
.table-glass {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    overflow: hidden;
    color: var(--text-light);
}

.table-glass thead th {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    font-weight: 600;
}

.table-glass tbody tr {
    transition: background 0.2s;
}

.table-glass tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.table-glass td, .table-glass th {
    border-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    vertical-align: middle;
}

/* Glass Buttons */
.glass-btn {
    background: var(--btn-gradient);
    border: none;
    color: white;
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.glass-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: white;
}

.glass-btn:active {
    transform: scale(0.98);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
}

/* Navigation Bar */
.glass-nav {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-brand, .nav-link {
    color: white !important;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.8;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* List Group (for punches) */
.list-group-item.glass-list {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    margin-bottom: 5px;
    border-radius: 12px !important;
}

/* Alerts */
.alert {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border: none;
    color: white;
    border-radius: 12px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.7);
}
.alert-danger {
    background: rgba(220, 53, 69, 0.7);
}
.alert-warning {
    background: rgba(255, 193, 7, 0.7);
}
.alert-info {
    background: rgba(23, 162, 184, 0.7);
}

/* Modal Customization */
.modal-content.glass-card {
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(20px);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-close {
    filter: invert(1);
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-tabs .nav-link {
    color: white;
    border: none;
    margin-right: 5px;
    border-radius: 10px 10px 0 0;
}

.nav-tabs .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
}

.nav-tabs .nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    border: none;
}

/* Video container (face capture) */
#video {
    border-radius: 16px;
    background: #000;
    border: 2px solid var(--glass-border);
    max-height: 400px;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-card {
        margin: 10px;
        padding: 15px !important;
    }
    
    .glass-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .table-glass {
        font-size: 12px;
    }
    
    .table-glass td, .table-glass th {
        padding: 6px;
    }
    
    .btn-group-sm .btn {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    h2, h3, h4 {
        font-size: 1.4rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    #video {
        max-height: 300px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Scrollbar custom */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    margin-top: 30px;
}

/* Utility classes */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7);
}

.cursor-pointer {
    cursor: pointer;
}

/* Face recognition status */
#statusMsg .alert {
    transition: all 0.3s;
}

/* Fixed header spacing */
body {
    padding-top: 70px;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
}