/* ========================================
   ROOT VARIABLES - BLUE & BLACK THEME
   ======================================== */

:root {
    /* Light Theme - Blue */
    --primary: #0099ff;
    --primary-dark: #0077cc;
    --primary-light: #66b5ff;
    --primary-bg: #e6f3ff;
    --secondary: #1a1a1a;
    --dark: #000000;
    --light: #f8f9fa;
    --white: #ffffff;
    --black: #000000;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --gray-dark: #343a40;
    
    --bg: #f8f9fa;
    --bg-card: #ffffff;
    --text: #212529;
    --text-secondary: #6c757d;
    --border: #dee2e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
    
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    /* Dark Theme - Black */
    --bg: #000000;
    --bg-card: #1a1a1a;
    --text: #ffffff;
    --text-secondary: #b0b0b0;
    --border: #333333;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

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

/* ========================================
   CONTAINER & UTILITIES
   ======================================== */

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

.text-primary {
    color: var(--primary) !important;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(0, 153, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 153, 255, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-google {
    background: #db4437;
    color: white;
}

.btn-google:hover {
    background: #c53929;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.w-100 {
    width: 100%;
}

.text-center {
    text-align: center;
}

.mt-5 {
    margin-top: 3rem;
}

/* ========================================
   HEADER
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

.logo {
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text);
}

.logo-light {
    display: block;
}

[data-theme="dark"] .logo-light {
    display: none;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
    color: white;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    color: var(--text);
}

.lang-btn img {
    width: 20px;
    height: 15px;
    object-fit: cover;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    min-width: 150px;
    z-index: 10;
    margin-top: 8px;
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.lang-dropdown a:hover {
    background: var(--bg);
}

.lang-dropdown img {
    width: 20px;
    height: 15px;
}

.language-selector:hover .lang-dropdown {
    display: flex;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: var(--transition);
}

.theme-toggle i {
    font-size: 20px;
}

.theme-toggle .fa-sun {
    display: block;
    color: #ffc107;
}

.theme-toggle .fa-moon {
    display: none;
    color: #f8f9fa;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: block;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 12px;
}

/* User Menu */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow);
    min-width: 200px;
    display: none;
    margin-top: 8px;
    z-index: 10;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--bg);
}

.user-dropdown .dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.user-menu:hover .user-dropdown {
    display: block;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text);
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 1001;
    transition: var(--transition);
    padding: 20px;
    border-right: 1px solid var(--border);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.mobile-menu-header button {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text);
    cursor: pointer;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.mobile-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
}

.mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="rgba(255,255,255,0.1)"><path d="M50 15 L61 40 L88 44 L67 60 L72 88 L50 73 L28 88 L33 60 L12 44 L39 40 Z"/></svg>') repeat;
    background-size: 100px 100px;
    opacity: 0.1;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* ========================================
   SERVICES SECTION
   ======================================== */

.services-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

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

.service-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.service-card p {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

/* ========================================
   HOW IT WORKS
   ======================================== */

.how-it-works {
    padding: 80px 0;
    background: var(--bg);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-item {
    text-align: center;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    position: relative;
    color: white;
    font-size: 32px;
}

.step-number {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid var(--primary);
}

.step-item h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.step-item p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   FAQ SECTION
   ======================================== */

.faq-section {
    padding: 80px 0;
    background: var(--bg-card);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-card);
}

.faq-question h3 {
    font-size: 16px;
    font-weight: 600;
}

.faq-question i {
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    color: var(--text-secondary);
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-info p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   MODAL
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

/* ========================================
   AUTH FORMS
   ======================================== */

.auth-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.auth-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
}

.auth-tab.active {
    color: var(--primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox input {
    width: auto;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    background: var(--bg-card);
    padding: 0 16px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
}

.password-strength {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: var(--transition);
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

.toast i {
    font-size: 20px;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.warning i {
    color: var(--warning);
}

.toast.info i {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
}

.toast-close:hover {
    color: var(--text);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   TABLES
   ======================================== */

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.status-completed {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.status-cancelled {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* ========================================
   LOADING SPINNER
   ======================================== */

.loading-spinner {
    text-align: center;
    padding: 40px;
}

.loading-spinner i {
    font-size: 40px;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 48px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-container {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 28px;
    }
}