:root {
    --bg-color: #0f1115;
    --text-color: #e2e8f0;
    --primary-color: #d4af37; /* Gold */
    --primary-hover: #b5952f;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #fff 40%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 15px;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #000;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #fff, var(--primary-color));
    box-shadow: 0 5px 25px rgba(212, 175, 55, 0.6);
}

.btn-primary.large {
    padding: 15px 40px;
    font-size: 1.2rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 2rem;
    color: #fff;
}

.logo span {
    color: var(--primary-color);
}

.nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    font-size: 1.1rem;
    transition: var(--transition);
}

.nav a:not(.btn-primary):hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at center, rgba(212,175,55,0.1) 0%, rgba(15,17,21,1) 70%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDUiLz4KPC9zdmc+');
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

.hero h2 {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: #a0aec0;
}

/* Services */
.services {
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 15px 0;
}

.service-duration {
    font-size: 0.9rem;
    color: #718096;
}

/* Booking */
.booking {
    padding: 100px 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDUiLz4KPC9zdmc+');
}

.booking-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #e2e8f0;
}

input, select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

select option {
    background: var(--bg-color);
    color: #fff;
}

.submit-btn {
    width: 100%;
    margin-top: 10px;
    font-size: 1.2rem;
}

.message {
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.message.success {
    display: block;
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
    border: 1px solid #48bb78;
}

.message.error {
    display: block;
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
    border: 1px solid #f56565;
}

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

.admin-link {
    display: inline-block;
    margin-top: 15px;
    color: #718096;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin Panels specific */
.admin-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
}

.login-card .logo {
    margin-bottom: 30px;
}

.dashboard-container {
    padding: 40px 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #c53030);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.4);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid var(--glass-border);
}

th {
    color: var(--primary-color);
    font-weight: 700;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.action-btn {
    background: none;
    border: none;
    color: #f56565;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.action-btn:hover {
    color: #c53030;
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; }
    .nav ul { display: none; } /* Could add a hamburger menu */
    .form-row { grid-template-columns: 1fr; }
}

/* Booking Type Selector */
.booking-type-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 8px;
    margin-bottom: 15px;
}

.booking-type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.booking-type-option:hover {
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.05);
}

.booking-type-option input[type="radio"] {
    display: none;
}

.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    transition: var(--transition);
}

.booking-type-option input[type="radio"]:checked + .custom-radio {
    border-color: var(--primary-color);
}

.booking-type-option input[type="radio"]:checked + .custom-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.booking-type-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: rgba(212, 175, 55, 0.1);
}

.option-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: right;
}

.option-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.option-desc {
    font-size: 0.75rem;
    color: #a0aec0;
}

/* Badges for Queue and Admin Dashboard */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.badge.normal {
    background: rgba(113, 128, 150, 0.2);
    color: #cbd5e0;
    border: 1px solid rgba(113, 128, 150, 0.4);
}

.badge.groom {
    background: rgba(212, 175, 55, 0.2);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

@media (max-width: 600px) {
    .booking-type-container {
        grid-template-columns: 1fr;
    }
}

/* Shop Status Banner */
.shop-status-banner {
    position: fixed;
    top: 80px; /* matches header height */
    left: 0;
    width: 100%;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    z-index: 999;
    font-size: 0.95rem;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.shop-status-banner.open {
    background: rgba(72, 187, 120, 0.9);
    color: #fff;
    border-bottom-color: #48bb78;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.shop-status-banner.closed {
    background: rgba(245, 101, 101, 0.9);
    color: #fff;
    border-bottom-color: #f56565;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

/* Base adjustment for body padding */
body {
    padding-top: 80px;
}

/* Dashboard Settings and Barbers Panel */
.admin-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .admin-settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-card, .barbers-card {
    padding: 25px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.status-toggle-container {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.status-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    background: rgba(0,0,0,0.3);
    color: #cbd5e0;
    transition: var(--transition);
}

.status-btn.active.open-btn {
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
    border-color: #48bb78;
}

.status-btn.active.closed-btn {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
    border-color: #f56565;
}

.barber-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.barber-form input {
    flex: 2;
}

.barber-form button {
    flex: 1;
}

.barbers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.barber-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.barber-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.barber-status-select {
    padding: 5px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

.badge.active {
    background: rgba(72, 187, 120, 0.2);
    color: #48bb78;
    border: 1px solid #48bb78;
}

.badge.busy {
    background: rgba(237, 137, 54, 0.2);
    color: #ed8936;
    border: 1px solid #ed8936;
}

.badge.off {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
    border: 1px solid #f56565;
}

/* Secondary Button (for Hero & general use) */
.btn-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-secondary.large {
    padding: 15px 40px;
    font-size: 1.2rem;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.nav a i.fa-android {
    color: #3ddc84; /* Android green */
    margin-left: 5px;
}

/* Download App Section */
.download-app {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(20, 24, 30, 1) 100%);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
}

.download-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
}

.download-content {
    text-align: right;
}

.download-desc {
    font-size: 1.2rem;
    color: #cbd5e0;
    margin-bottom: 2rem;
}

.download-desc span {
    color: var(--primary-color);
    font-weight: bold;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 3rem;
}

.feature-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-direction: row-reverse; /* For RTL support */
}

.feature-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    background: rgba(212, 175, 55, 0.1);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-text {
    text-align: right;
}

.feature-text h4 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 5px;
}

.feature-text p {
    color: #a0aec0;
    font-size: 0.95rem;
}

/* Download APK Button */
.download-action {
    display: flex;
    justify-content: flex-start;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #111;
    border: 2px solid var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 12px;
    transition: var(--transition);
    text-align: right;
    flex-direction: row-reverse; /* For RTL icon on the side */
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
    background: var(--primary-color);
    color: #000;
}

.btn-download:hover .android-icon {
    color: #000;
}

.android-icon {
    font-size: 2.2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.btn-info {
    display: flex;
    flex-direction: column;
}

.btn-subtext {
    font-size: 0.75rem;
    color: #a0aec0;
    transition: var(--transition);
}

.btn-download:hover .btn-subtext {
    color: #333;
}

.btn-maintext {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Smartphone Mockup */
.download-mockup-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.smartphone-mockup {
    width: 290px;
    height: 540px;
    background: #000;
    border: 12px solid #2d3748;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.smartphone-mockup:hover {
    transform: translateY(-5px) rotate(-1deg);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.9), 0 0 50px rgba(212, 175, 55, 0.2);
}

.smartphone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 20px;
    background: #2d3748;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 10;
}

.smartphone-mockup::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.02) 50%, transparent 50.1%);
    pointer-events: none;
    z-index: 5;
}

.smartphone-screen {
    width: 100%;
    height: 100%;
    background: #0f1115;
    padding: 25px 15px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #fff;
    user-select: none;
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
    margin-top: 5px;
    flex-direction: row-reverse; /* RTL for navbar header inside app screen */
}

.mockup-logo {
    height: 24px;
    width: 24px;
    border-radius: 5px;
    object-fit: cover;
}

.mockup-header span {
    font-weight: bold;
    font-size: 0.85rem;
}

.mockup-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
    justify-content: center;
}

.mockup-status-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    position: relative;
}

.mockup-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.6rem;
    color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-direction: row-reverse;
}

.mockup-status-badge i {
    font-size: 0.4rem;
    animation: pulse 1.5s infinite;
}

.mockup-status-card h4 {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 5px;
    margin-bottom: 5px;
}

.mockup-queue-number {
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 5px 0;
    line-height: 1;
}

.mockup-status-card p {
    font-size: 0.7rem;
    color: #cbd5e0;
    margin-bottom: 0;
}

.mockup-barber-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--glass-border);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    flex-direction: row-reverse; /* RTL info */
}

.mockup-barber-info i {
    color: var(--primary-color);
}

.mockup-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.mockup-progress-fill {
    width: 70%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-hover), var(--primary-color));
    border-radius: 3px;
}

.mockup-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.75rem;
    margin-top: 5px;
    cursor: not-allowed;
    opacity: 0.8;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .download-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .download-content {
        text-align: center;
    }
    .download-content .section-title {
        text-align: center;
    }
    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    .feature-text {
        text-align: center;
    }
    .download-action {
        display: flex;
        justify-content: center;
    }
}

