:root {
    /* Dark mode colors */
    --bg-primary: #14151a;
    --bg-secondary: #1e1f26;
    --bg-surface: #252730;
    --border-color: #2d3239;
    --text-primary: #f9fafb;
    --text-secondary: #a3a8b0;
    --primary: #3b82f6;
    --accent: #10b981;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
}

.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-surface: #f3f4f6;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --primary: #2563eb;
    --accent: #059669;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.lang-switcher-inline {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-left: 10px;
    padding: 0 10px;
    border-left: 1px solid var(--border-color);
}

.lang-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lang-link:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.lang-link.active {
    background: var(--primary);
    color: white;
}

.lang-link i {
    font-size: 0.85rem;
}

.mode-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin-left: 10px;
}

.mode-toggle:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.flashes {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 999;
    max-width: 400px;
}

.flash {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    animation: slideIn 0.3s;
}

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

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

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

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

/* Header */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-image: url('/static/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
}

.logo-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
}

nav {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 10px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.nav-link i {
    font-size: 1rem;
}

.nav-text {
    display: inline;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.logo-text {
    display: inline;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 200px 0 100px;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.free-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 50px;
    margin-bottom: 30px;
    font-size: 1.1rem;
    font-weight: 600;
}

.trust-indicator {
    margin-top: 30px;
    opacity: 0.9;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    padding: 12px 28px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--bg-surface);
    border-color: var(--primary);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

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

.btn-admin:hover {
    background: #0d9962;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Services Section */
.services-section {
    padding: 80px 0;
}

.services-section h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

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

.service-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s;
    position: relative;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-free {
    border: 2px solid var(--accent);
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.free-badge-small {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

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

.service-icon {
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--primary);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.service-detail {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Community Section */
.community-section {
    background: var(--bg-secondary);
    padding: 80px 0;
}

.community-box {
    background: var(--bg-surface);
    border-radius: 20px;
    padding: 60px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.community-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

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

.feature-item i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.cta-login {
    margin-top: 30px;
}

/* Footer */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary);
}

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

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 40px;
}

.auth-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 50px;
    max-width: 450px;
    width: 100%;
}

.auth-box h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.auth-form {
    margin-bottom: 25px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

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

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-link {
    text-align: center;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.dashboard-actions {
    margin-bottom: 40px;
}

.projects-grid {
    display: grid;
    gap: 25px;
}

.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
}

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

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending {
    background: var(--warning);
    color: white;
}

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

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

.project-section {
    margin: 15px 0;
}

.admin-notes {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--primary);
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
}

.whatsapp-link,
.file-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.no-projects {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-projects i {
    margin-bottom: 20px;
}

/* Submit Project Form */
.project-form {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-top: 30px;
}

.form-actions {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

/* Admin Panel */
.admin-header {
    margin-bottom: 40px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary);
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.project-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.status-select {
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
}

.admin-notes-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.project-extra-info {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.service-link {
    display: flex;
    gap: 10px;
    align-items: center;
}

.service-url-input {
    flex: 1;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
}

.service-controls {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

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

.admin-project-card {
    margin-bottom: 20px;
}

.admin-project-card .project-main-info {
    margin-bottom: 15px;
}

.admin-project-card .project-user {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

.admin-service-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.admin-service-card.service-free {
    border: 2px solid var(--accent);
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.services-management {
    margin-top: 20px;
}

.service-form-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.service-form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-form-container input,
.service-form-container textarea,
.service-form-container select {
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.service-form-container h3 {
    margin-bottom: 20px;
}

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.service-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.service-link label {
    min-width: 150px;
    font-weight: 600;
}

.project-details {
    margin-top: 10px;
    padding: 10px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 6px;
}

/* RTL Support */
body.rtl {
    direction: rtl;
}

body.rtl .container,
body.rtl .header-content,
body.rtl .admin-header,
body.rtl .footer-content {
    direction: rtl;
}

body.rtl .service-link label {
    margin-right: 0;
    margin-left: 10px;
}

/* Enhanced Beauty */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.service-card {
    background: linear-gradient(145deg, var(--bg-surface), var(--bg-secondary));
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.service-card:hover {
    box-shadow: 0 16px 48px rgba(59, 130, 246, 0.4);
    transform: translateY(-12px) scale(1.02);
}

.community-box {
    background: linear-gradient(145deg, var(--bg-surface), var(--bg-secondary));
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.community-box:hover {
    box-shadow: 0 16px 48px rgba(16, 185, 129, 0.3);
}

.feature-item {
    transition: all 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

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

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* Enhanced buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
    transform: translateY(-3px);
}

/* Animated background */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive - Desktop & Large Tablets */
@media (min-width: 993px) {
    nav.main-nav {
        display: flex !important;
    }
}

/* Responsive - Mobile & Tablets */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    nav.main-nav {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        opacity: 0;
        display: flex;
    }
    
    nav.main-nav.mobile-open {
        max-height: 600px;
        padding: 20px 24px;
        opacity: 1;
    }
    
    nav.main-nav .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 18px;
    }
    
    .header-content {
        position: relative;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .community-features {
        grid-template-columns: 1fr;
    }
    
    .project-actions {
        flex-direction: column;
    }
    
    nav.main-nav .lang-switcher-inline,
    nav.main-nav .mode-toggle {
        border-left: none;
        margin-left: 0;
        width: 100%;
        border-top: 1px solid var(--border-color);
        padding-top: 15px;
        margin-top: 15px;
    }
    
    nav.main-nav .lang-switcher-inline {
        border-radius: 0;
        justify-content: center;
    }
    
    nav.main-nav .mode-toggle {
        border-radius: 8px;
        margin-left: 0;
    }
}

@media (max-width: 600px) {
    .logo-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    nav.main-nav .lang-link,
    nav.main-nav .mode-toggle {
        font-size: 0.85rem;
    }
}

