/* Base variables from arxcode_web */
:root {
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --secondary-gradient: linear-gradient(135deg, #e11d48 0%, #3b82f6 100%);
    --bg-dark: #020617;
    --bg-card: rgba(15, 23, 42, 0.45);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-red: #e11d48;
    --accent-cyan: #06b6d4;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.1);
    --selection-bg: rgba(59, 130, 246, 0.3);

    /* Dashboard specifics */
    --color-sidebar: #090d16;
    --color-danger: #ef4444;
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

::selection {
    background-color: var(--selection-bg);
    color: white;
}

/* Background Effects */
.main-glow {
    position: fixed;
    top: -10%;
    right: -5%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(2, 6, 23, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.secondary-glow {
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.08) 0%, rgba(2, 6, 23, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

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

.section-padding {
    padding: 8rem 0;
}

/* Utilities */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    font-family: 'Outfit', sans-serif;
}

.text-gradient-icon {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.4));
}

.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
    text-transform: none;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Landing Page Wrapper */
.landing-page {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    z-index: 100;
    scroll-behavior: smooth;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    background: rgba(2, 6, 23, 0.8);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.logo a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1.8rem;
    font-weight: 800;
}

.logo i {
    font-size: 2.1rem;
    color: var(--accent-blue);
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
}

.logo-text {
    font-family: 'Outfit', sans-serif;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:not(.btn):hover {
    color: white;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

/* Hero Section */
.hero {
    padding-top: 12rem;
    padding-bottom: 8rem;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 4rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 2rem;
    font-family: 'Outfit', sans-serif;
    color: white;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.hero-visual {
    position: relative;
    width: 100%;
    perspective: 1200px;
}

.code-window {
    position: relative;
    padding: 0;
    overflow: hidden;
    transform: rotateY(-10deg) rotateX(5deg);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.12);
}

.window-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.dots {
    display: flex;
    gap: 0.5rem;
    margin-right: 1.5rem;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.window-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'Fira Code', 'Monaco', monospace;
}

.window-body {
    padding: 2.5rem;
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.7;
}

.keyword { color: var(--accent-red); }
.class-name { color: var(--accent-cyan); }
.this { color: var(--accent-blue); }
.boolean { color: var(--accent-blue); }
.string { color: #818cf8; }
.function { color: #facc15; }
.return { color: var(--accent-red); }

.visual-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(2, 6, 23, 0) 70%);
    z-index: -1;
}

.scroll-down {
    position: absolute;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--accent-blue);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.scroll-down a {
    color: inherit;
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    color: white;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
}

/* Grids */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* Cards */
.service-card {
    padding: 3.5rem 2.5rem;
    text-align: left;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-8px);
}

.service-icon {
    font-size: 2.25rem;
    margin-bottom: 2rem;
    color: var(--accent-blue);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: white;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Download Badge Styles */
.download-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.download-badge {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    text-decoration: none;
    text-align: left;
    transition: all 0.2s;
}

.download-badge:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    padding: 4rem 0 3rem;
    border-top: 1px solid var(--border-color);
    margin-top: 5rem;
}

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

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ─────────────────────────────────────────────────────────── */
/* APP DASHBOARD LAYOUT (Shown when logged in) */
/* ─────────────────────────────────────────────────────────── */

.app-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    background-color: var(--bg-dark);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--color-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    flex-shrink: 0;
}

.sidebar .brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    color: white;
}

.sidebar-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar .section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: block;
}

.folder-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.folder-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.folder-item:hover, .folder-item.active {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.folder-item.active {
    border-left: 3px solid var(--accent-blue);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.folder-count {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    color: var(--text-secondary);
}

.btn-sidebar-add {
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-sidebar-add:hover {
    border-color: var(--accent-blue);
    color: white;
}

/* Sidebar Footer */
.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info i {
    font-size: 2rem;
    color: var(--accent-blue);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-email {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.sync-status {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.sync-status.syncing {
    color: var(--accent-cyan);
}

.sync-status i {
    font-size: 0.75rem;
    color: inherit;
}

.sidebar .btn-logout {
    width: 100%;
    padding: 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar .btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-header {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    flex-shrink: 0;
}

.search-box {
    position: relative;
    width: 350px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-blue);
}

.content-body {
    flex-grow: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

.current-folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.current-folder-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
}

.folder-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.btn-icon.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Dials Grid */
.dials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Dial Card */
.dial-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    overflow: hidden;
}

.dial-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.7);
}

.dial-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.dial-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dial-url {
    font-size: 0.75rem;
    color: var(--text-secondary);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card Actions */
.dial-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.dial-card:hover .dial-actions {
    opacity: 1;
}

.dial-action-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.dial-action-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.dial-action-btn.delete:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Dial Add Placeholder */
.dial-card-add {
    border: 1px dashed var(--border-color);
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
}

.dial-card-add:hover {
    border-color: var(--accent-blue);
    color: white;
    background: rgba(255, 255, 255, 0.01);
}

.dial-card-add i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Modal form specifics */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    font-family: inherit;
}

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

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .hero-title { font-size: 3.5rem; }
    .hero-container { gap: 2rem; }
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-description { margin: 0 auto 3rem; }
    .hero-buttons { justify-content: center; }
    .hero-visual { max-width: 650px; margin: 0 auto; transform: none; }
    .code-window { transform: none; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
    .hero-title { font-size: 2.75rem; }
    .section-title { font-size: 2.25rem; }
    .footer-bottom { flex-direction: column; gap: 2rem; text-align: center; }

    /* Dashboard specifics on mobile */
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
    }
    .main-header {
        padding: 0 1.5rem;
    }
    .content-body {
        padding: 1.5rem;
    }
}
