/* ========== Reset & Base ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --accent: #00D2D3;
    --success: #00B894;
    --danger: #E17055;
    --warning: #FDCB6E;
    --dark: #2D3436;
    --gray-900: #1a1a2e;
    --gray-800: #222240;
    --gray-700: #2a2a4a;
    --gray-600: #3a3a5a;
    --gray-400: #a0a0c0;
    --gray-300: #c0c0d8;
    --white: #ffffff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-900);
    color: var(--gray-300);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== Navigation ========== */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.02em;
}

.nav-link {
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--white);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-user {
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* ========== Hero ========== */
.hero {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 50%, #1a1a3e 100%);
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    padding-top: 60px;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray-400);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-danger:hover {
    opacity: 0.85;
}

.btn-full {
    width: 100%;
    text-align: center;
}

.btn-lg {
    padding: 18px 44px;
    font-size: 1.05rem;
}

/* ========== Platforms ========== */
.platforms {
    padding: 80px 0;
}

.platforms h2,
.calendar-section h2,
.cta h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-400);
    margin-bottom: 40px;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.platform-card {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s;
}

.platform-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.15);
}

.platform-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.platform-card h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.platform-card p {
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* ========== Calendar ========== */
.calendar-section {
    padding: 80px 0;
    background: var(--gray-800);
}

.calendar-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: var(--gray-900);
    border-radius: var(--radius);
    border: 1px solid var(--gray-700);
    padding: 32px;
    box-shadow: var(--shadow);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-header h3 {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 600;
}

.cal-nav {
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.dot-free {
    background: var(--success);
}

.dot-booked {
    background: var(--danger);
}

.dot-past {
    background: var(--gray-600);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-day-name {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-400);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.cal-day.empty {
    cursor: default;
}

.cal-day.free {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 184, 148, 0.25);
}

.cal-day.free:hover {
    background: rgba(0, 184, 148, 0.25);
    transform: scale(1.08);
}

.cal-day.booked {
    background: rgba(225, 112, 85, 0.15);
    color: var(--danger);
    border: 1px solid rgba(225, 112, 85, 0.3);
}

.cal-day.booked:hover {
    background: rgba(225, 112, 85, 0.3);
    transform: scale(1.08);
}

.cal-day.past {
    background: var(--gray-800);
    color: var(--gray-600);
    cursor: default;
    border: 1px solid transparent;
}

.cal-day.today {
    box-shadow: 0 0 0 2px var(--primary);
}

.cal-day .platform-badge {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.6rem;
}

/* ========== Modal ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--white);
}

#modal-body h3 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

#modal-body p {
    margin-bottom: 8px;
    color: var(--gray-300);
}

#modal-body .status-free {
    color: var(--success);
    font-weight: 600;
    font-size: 1.1rem;
}

#modal-body .status-booked {
    color: var(--danger);
    font-weight: 600;
    font-size: 1.1rem;
}

/* ========== CTA ========== */
.cta {
    padding: 80px 0;
    text-align: center;
}

.cta p {
    color: var(--gray-400);
    margin: 12px 0 32px;
    font-size: 1.05rem;
}

/* ========== Footer ========== */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--gray-700);
    text-align: center;
}

.footer p {
    color: var(--gray-600);
    font-size: 0.85rem;
}

/* ========== Admin ========== */
.admin-header {
    background: var(--gray-800);
    border-bottom: 1px solid var(--gray-700);
}

.admin-main {
    padding: 48px 0;
    min-height: calc(100vh - 72px);
}

.admin-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 32px;
}

.login-card {
    max-width: 400px;
    margin: 80px auto;
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.login-card h2 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 24px;
    text-align: center;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-400);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-600);
    background: var(--gray-900);
    color: var(--white);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group select {
    cursor: pointer;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(225, 112, 85, 0.15);
    color: var(--danger);
    border: 1px solid rgba(225, 112, 85, 0.3);
}

.alert-success {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 184, 148, 0.3);
}

.form-message {
    margin-top: 12px;
    font-size: 0.9rem;
    text-align: center;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.admin-card {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: var(--radius);
    padding: 28px;
}

.admin-card h3 {
    color: var(--white);
    font-size: 1.15rem;
    margin-bottom: 20px;
}

.admin-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.admin-month-nav span {
    color: var(--white);
    font-weight: 600;
}

.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.booking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.booking-info {
    flex: 1;
}

.booking-date {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
}

.booking-meta {
    color: var(--gray-400);
    font-size: 0.8rem;
    margin-top: 2px;
}

.no-bookings {
    color: var(--gray-600);
    text-align: center;
    padding: 24px;
    font-size: 0.9rem;
}

/* ========== Mini Calendar Picker ========== */
.mini-calendar {
    background: var(--gray-900);
    border: 1px solid var(--gray-600);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.mini-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mini-cal-header span {
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.cal-nav-sm {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
}

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.mini-day-name {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-400);
    padding: 4px 0;
    text-transform: uppercase;
}

.mini-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.mini-day.empty {
    cursor: default;
}

.mini-day.free {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 184, 148, 0.2);
}

.mini-day.free:hover {
    background: rgba(0, 184, 148, 0.3);
    transform: scale(1.1);
}

.mini-day.booked {
    background: rgba(225, 112, 85, 0.15);
    color: var(--danger);
    border: 1px solid rgba(225, 112, 85, 0.2);
    cursor: not-allowed;
    opacity: 0.6;
}

.mini-day.past {
    background: var(--gray-800);
    color: var(--gray-600);
    cursor: default;
    border: 1px solid transparent;
}

.mini-day.selected {
    background: var(--primary) !important;
    color: var(--white) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.4);
    opacity: 1;
}

.picker-selected-label {
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    min-height: 20px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .calendar-wrapper {
        padding: 20px;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .calendar-grid {
        gap: 3px;
    }

    .cal-day {
        font-size: 0.8rem;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
    }
}
