:root {
    /* Gemini/OpenAI style colors */
    --background: #ffffff;
    --surface: #ffffff;
    --text: #0f0f0f;
    --text-secondary: #666666;
    --accent: #1a1a1a;
    --border: #e5e5e5;
    --hover: #f9f9f9;
    --disabled: #f2f2f2;
    --error: #dc2626;
    --error-light: rgba(220, 38, 38, 0.1);

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--background);
    padding: var(--space-4);
    padding-bottom: calc(80px + var(--space-4));
    max-width: 600px;
    margin: 0 auto;
    -webkit-font-smoothing: antialiased;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

/* Enhanced Card Styles */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: var(--space-4);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Enhanced Form Styles */
.input-group {
    margin-bottom: var(--space-6);
}

.input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--text);
}

.input-field {
    width: 100%;
    padding: var(--space-4);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: all 0.2s ease;
    background: var(--surface);
}

.input-field:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
    outline: none;
}

.input-field::placeholder {
    color: var(--text-secondary);
}

/* Enhanced Button Styles */
.btn {
    padding: var(--space-4) var(--space-6);
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

/* Success Message */
.success-message {
    background: #10B981;
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    animation: slideIn 0.3s ease;
}

/* Error Message */
.error-message {
    background: var(--error);
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    width: 70vw;
    max-width: 800px;
    min-width: 300px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: contain;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: var(--space-4) 0;
    margin-bottom: var(--space-6);
}

.header-logo {
    display: none;
}

/* Show logo in main page and dashboard pages */
.main-page .header-logo,
.dashboard-page .header-logo {
    display: block;
    height: min(25vh, 200px);
    min-height: 120px;
    width: auto;
    margin: 0 auto;
}

/* Responsive logo sizes */
@media (max-width: 480px) {
    .loading-logo {
        width: 90vw;
        min-width: 280px;
        max-width: 800px;
    }
    
    .main-page .header-logo,
    .dashboard-page .header-logo {
        height: min(12vh, 80px);
        min-height: 60px;
    }
}

@media (min-width: 1024px) {
    .loading-logo {
        width: 60vw;
        max-width: 800px;
    }
    
    .main-page .header-logo,
    .dashboard-page .header-logo {
        height: min(12vh, 100px);
    }
}

.header .back-button {
    position: absolute;
    left: 0;
    color: var(--text);
    text-decoration: none;
    font-size: 20px;
}

.header-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

/* Service Cards */
.service-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.service-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.service-card:hover {
    background: var(--hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent);
    background: var(--hover);
    border-radius: 50%;
    margin: 0 auto;
}

.service-info {
    flex: 1;
}

.service-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: var(--space-1);
}

.service-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-secondary);
    font-size: 14px;
}

/* Fixed Bottom Navigation */
.nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 1000;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link i {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-link.active {
    color: var(--text);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--text);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 48px;
    padding: 0 var(--space-4);
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Cancel Button */
.btn-cancel {
    background: var(--error-light);
    color: var(--error);
    border: 1px solid var(--error);
}

.btn-cancel:hover {
    background: var(--error);
    color: white;
}

/* Auth Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
}

.auth-main {
    flex: 1;
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-6);
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

/* Calendar and Time Slots */
.datepicker {
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    padding: var(--space-4) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.time-slot {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-slot.selected {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Responsive */
@media (max-width: 374px) {
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    body {
        padding: var(--space-3);
    }
}
