/* ================================
   LINK360 UI - MINIMAL PROFESSIONAL DESIGN
   ================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

:root {
    /* Font */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    
    /* Transitions - Optimized for speed */
    --transition-fast: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows - Subtle and minimal */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.12);
    
    /* Borders - Minimal radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Spacing */
    --sidebar-width: 240px;
    --topbar-height: 64px;
}

/* Dark Theme - Professional */
html[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #222222;
    --bg-hover: #2a2a2a;
    --bg-active: #333333;
    
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-tertiary: #707070;
    
    --border-primary: #2a2a2a;
    --border-secondary: #333333;
    
    --accent-purple: #06b6d4;
    --accent-purple-hover: #0891b2;
    --accent-blue: #22d3ee;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    
    --card-bg: #1a1a1a;
    --card-border: #2a2a2a;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    
    --input-bg: #222222;
    --input-border: #333333;
    --input-focus: #7c3aed;
    
    --overlay: rgba(0, 0, 0, 0.75);
}

/* Light Theme - Clean */
html[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --bg-hover: #f0f0f0;
    --bg-active: #e5e5e5;
    
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    
    --border-primary: #e5e5e5;
    --border-secondary: #f0f0f0;
    
    --accent-purple: #06b6d4;
    --accent-purple-hover: #0891b2;
    --accent-blue: #22d3ee;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    
    --card-bg: #ffffff;
    --card-border: #e5e5e5;
    --card-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    
    --input-bg: #ffffff;
    --input-border: #e5e5e5;
    --input-focus: #7c3aed;
    
    --overlay: rgba(0, 0, 0, 0.4);
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(180deg, #0B1120 0%, #050A14 50%, #0B1120 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

html[data-theme="light"] body {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
}

html[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .topbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .stat-card,
html[data-theme="light"] .link-card,
html[data-theme="light"] .chart-card,
html[data-theme="light"] .analytics-card,
html[data-theme="light"] .profile-card,
html[data-theme="light"] .qr-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .quick-link-btn {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

html[data-theme="light"] .quick-link-btn:hover {
    background: rgba(6, 182, 212, 0.15);
}

html[data-theme="light"] .modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
}

html[data-theme="light"] .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .nav-item {
    color: var(--text-secondary);
}

html[data-theme="light"] .nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

html[data-theme="light"] .nav-item.active {
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    color: white;
}

html[data-theme="light"] .app-orb {
    display: none;
}

/* ================================
   SIDEBAR - MINIMAL DESIGN
   ================================ */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(11, 17, 32, 0.7);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(139, 157, 184, 0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(139, 157, 184, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.8;
}

.logo-image {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.logo-credit {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 2px;
    text-align: left;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-size: 15px;
    font-weight: 500;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(139, 157, 184, 0.1);
}

.theme-switcher {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.theme-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.theme-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.theme-btn.active {
    background: var(--accent-purple);
    color: white;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.sidebar-user .user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-user .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-email {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================
   MAIN CONTENT
   ================================ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin var(--transition-normal);
    position: relative;
}

/* App Background Orbs */
.app-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.app-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: landingFloat 25s infinite ease-in-out;
}

.app-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 70%);
    top: -250px;
    right: -250px;
}

.app-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3), transparent 70%);
    bottom: -200px;
    left: -200px;
    animation-delay: 8s;
}

.app-orb-3 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2), transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 16s;
}

/* ================================
   TOPBAR
   ================================ */

.topbar {
    height: var(--topbar-height);
    background: rgba(11, 17, 32, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 157, 184, 0.1);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-container {
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    min-width: 320px;
    transition: var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-box i {
    color: var(--text-tertiary);
    font-size: 14px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-clear {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.search-clear:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-suggestion-group {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-primary);
}

.search-suggestion-group:last-child {
    border-bottom: none;
}

.search-suggestion-header {
    padding: 4px 16px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.search-suggestion-item:hover {
    background: var(--bg-hover);
}

.search-suggestion-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.search-suggestion-icon.link {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    color: var(--accent-blue);
}

.search-suggestion-icon.feature {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(124, 58, 237, 0.2));
    color: var(--accent-purple);
}

.search-suggestion-icon.page {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    color: var(--accent-green);
}

.search-suggestion-content {
    flex: 1;
    min-width: 0;
}

.search-suggestion-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-suggestion-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-suggestion-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    padding: 0 4px;
}

.search-no-results {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-secondary);
}

.search-no-results i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.user-menu-btn .user-avatar {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-secondary);
    transition: var(--transition-fast);
}

.user-menu-btn:hover .user-avatar {
    border-color: var(--accent-purple);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: var(--transition-normal);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.dropdown-item:first-child {
    margin-top: 4px;
}

.dropdown-item:last-child {
    margin-bottom: 4px;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    padding-left: 22px;
}

.dropdown-item:hover i {
    color: var(--accent-purple);
    transform: scale(1.1);
}

.dropdown-item i {
    width: 18px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-primary);
    margin: 8px 0;
}

/* ================================
   PAGE CONTAINER
   ================================ */

.page-container {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.page {
    max-width: 1400px;
    margin: 0 auto;
}

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

.header-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

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

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

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ================================
   BUTTONS - MINIMAL & FAST
   ================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--accent-purple-hover);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
}

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

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

.btn-google {
    background: #3B82F6;
    color: white;
    border: none;
    width: 100%;
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.btn-google:hover {
    background: #60A5FA;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ================================
   STATS CARDS
   ================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 157, 184, 0.15);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition-fast);
}

.stat-card:hover {
    border-color: rgba(139, 157, 184, 0.25);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.purple {
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-purple);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.stat-icon.blue-light {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-orange);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-change {
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

.stat-change.positive {
    color: var(--accent-green);
}

.stat-change.negative {
    color: var(--accent-red);
}

/* ================================
   FILTERS BAR
   ================================ */

.filters-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 8px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.filter-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
}

.filter-select {
    padding: 8px 36px 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    min-width: 140px;
}

.filter-select:hover {
    border-color: var(--accent-purple);
    background: var(--bg-tertiary);
}

.filter-select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.filter-select:active {
    transform: scale(0.99);
}

.filter-select.enhanced {
    position: relative;
}

.filter-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px 14px;
    font-weight: 500;
    font-size: 13px;
}

.filter-select option:hover,
.filter-select option:checked {
    background: var(--accent-purple);
    color: white;
}

/* Light theme select arrow */
html[data-theme="light"] .filter-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background: var(--bg-tertiary);
}

html[data-theme="light"] .filter-select:hover {
    background: var(--bg-hover);
}

/* ================================
   LINKS CONTAINER
   ================================ */

.links-container {
    display: grid;
    gap: 16px;
}

.link-card {
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 157, 184, 0.15);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--transition-fast);
}

.link-card:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.link-card.inactive-link {
    opacity: 0.5;
    background: var(--bg-tertiary);
    border-style: dashed;
}

.link-card.inactive-link:hover {
    opacity: 0.7;
}

.link-icon {
    width: 44px;
    height: 44px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent-purple);
    flex-shrink: 0;
}

.link-icon.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.inactive-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 4px;
    color: var(--accent-red);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.link-content {
    flex: 1;
    min-width: 0;
}

.link-url {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.link-short {
    color: var(--accent-purple);
    text-decoration: none;
    transition: var(--transition-fast);
}

.link-short:hover {
    text-decoration: underline;
}

.link-destination {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.link-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.link-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.link-stats {
    display: flex;
    gap: 24px;
    align-items: center;
}

.link-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.link-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.link-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.link-actions {
    display: flex;
    gap: 8px;
}

.link-action-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.link-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.link-action-btn.delete:hover {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
}

/* ================================
   EMPTY STATE
   ================================ */

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ================================
   CHARTS
   ================================ */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 157, 184, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
}

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

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.chart-body {
    position: relative;
    height: 300px;
}

.chart-body canvas {
    max-height: 100%;
}

/* ================================
   ANALYTICS
   ================================ */

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.analytics-card {
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 157, 184, 0.15);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(139, 157, 184, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: var(--accent-purple);
}

.card-body {
    padding: 20px 24px;
}

.analytics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analytics-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.analytics-item-label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.analytics-item-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-purple);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   PROFILE PAGE
   ================================ */

.profile-grid {
    display: grid;
    gap: 24px;
}

.profile-card {
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 157, 184, 0.15);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--border-secondary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.form-input:read-only {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.7;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-primary);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.settings-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-color: transparent;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background: white;
}

.api-key-section {
    margin-top: 16px;
}

.input-with-action {
    display: flex;
    gap: 8px;
}

.input-with-action .form-input {
    flex: 1;
}

.card-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.danger-card {
    border-color: rgba(239, 68, 68, 0.3);
}

.danger-card .card-header {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

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

.danger-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.danger-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

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

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

.modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 10, 20, 0.85);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    position: relative;
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 157, 184, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(139, 157, 184, 0.1);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--border-primary);
}

.form-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-primary);
}

.form-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Bug Report Modal */
.bug-report-modal {
    max-width: 560px;
}

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

.bug-report-modal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    margin: 0;
}

.bug-report-modal .modal-header h2 i {
    color: var(--accent-red);
}

.bug-report-modal .modal-body {
    padding: 28px;
}

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

.bug-report-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.bug-report-modal .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-fast);
}

.bug-report-modal .form-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.bug-report-modal textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.bug-report-modal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.report-bug-btn {
    border-top: 1px solid var(--border-primary);
    margin-top: auto;
}

/* Login Modal */
.login-modal {
    max-width: 560px;
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 157, 184, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    padding: 48px 40px 32px;
    border-bottom: 1px solid rgba(139, 157, 184, 0.1);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.login-logo-image {
    height: 50px;
    width: auto;
    display: block;
}

.login-logo-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.login-logo-text {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.login-logo-credit {
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 2px;
    text-align: left;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.6;
}

.login-description {
    padding: 20px 28px 0;
    background: var(--background-secondary);
}

.login-description a:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.github-btn {
    color: var(--text-primary) !important;
    text-decoration: none;
    transition: var(--transition-fast);
}

.github-btn:hover {
    color: var(--accent-purple) !important;
    transform: translateY(-2px);
}

.github-btn i {
    font-size: 20px;
}

/* ================================
   ANIMATIONS
   ================================ */

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ================================
   RESPONSIVE DESIGN - TABLET
   ================================ */

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .sidebar-toggle {
        display: block;
    }

    .search-box {
        max-width: 200px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .links-container {
        gap: 16px;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   RESPONSIVE DESIGN - MOBILE
   ================================ */

@media (max-width: 768px) {
    /* Layout */
    .page-container {
        padding: 16px;
    }

    .topbar {
        padding: 0 12px;
        height: 56px;
    }

    .topbar-left {
        gap: 12px;
    }

    .topbar-right {
        gap: 12px;
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-title {
        font-size: 22px;
    }

    .page-description {
        font-size: 13px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 28px;
    }

    .stat-label {
        font-size: 13px;
    }

    /* Filters */
    .filters-bar {
        flex-direction: column;
        gap: 12px;
    }

    .filter-tabs {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .filter-tab {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 13px;
    }

    .filters-right {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    .filter-select {
        width: 100%;
    }

    /* Links Container */
    .links-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .link-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .link-icon {
        width: 40px;
        height: 40px;
    }

    .link-content {
        width: 100%;
    }

    .link-url {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .link-short {
        font-size: 14px;
        word-break: break-all;
    }

    .link-destination {
        font-size: 12px;
        word-break: break-all;
    }

    .link-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .link-stats {
        width: 100%;
        justify-content: space-around;
        padding: 12px 0;
        border-top: 1px solid var(--border-primary);
        margin-top: 12px;
    }

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

    .link-actions {
        width: 100%;
        justify-content: stretch;
        gap: 8px;
        margin-top: 12px;
    }

    .btn-icon {
        flex: 1;
        padding: 10px;
    }

    /* Modal */
    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }

    .modal-header h3 {
        font-size: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    /* Forms */
    .form-group label {
        font-size: 13px;
    }

    .form-input,
    .form-textarea {
        font-size: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Analytics */
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .analytics-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .analytics-filters {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    .analytics-filters select {
        width: 100%;
    }

    .chart-container {
        padding: 16px;
    }

    .chart-header h4 {
        font-size: 16px;
    }

    /* Profile Page */
    .profile-sections {
        gap: 16px;
    }

    .profile-section {
        padding: 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    /* Search Box */
    .search-container {
        width: 100%;
        max-width: 100%;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .search-suggestions {
        left: 0;
        right: 0;
        max-width: 100%;
    }

    /* Sidebar Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar.show ~ .sidebar-overlay {
        display: block;
    }

    /* Login Modal */
    .login-modal {
        max-width: 100%;
        margin: 0;
    }

    .login-description {
        padding: 16px 20px 0;
    }

    .login-description p {
        font-size: 13px;
    }
}

/* ================================
   RESPONSIVE DESIGN - SMALL MOBILE
   ================================ */

@media (max-width: 480px) {
    /* Typography */
    .logo-text {
        display: none;
    }

    .page-title {
        font-size: 18px;
    }

    /* Topbar */
    .topbar-right {
        gap: 8px;
    }

    .github-btn {
        display: none;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
    }

    /* Stats */
    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    /* Filter Tabs */
    .filter-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* Link Cards */
    .link-card {
        padding: 12px;
    }

    .link-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .link-short {
        font-size: 13px;
    }

    .link-destination {
        font-size: 11px;
    }

    .link-meta {
        font-size: 11px;
    }

    .link-actions {
        flex-wrap: wrap;
    }

    .btn-icon {
        padding: 8px;
    }

    /* Modal */
    .modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
        border-radius: 12px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 16px;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Forms */
    .form-group {
        margin-bottom: 16px;
    }

    .form-input,
    .form-textarea {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Charts */
    .chart-container {
        padding: 12px;
    }

    .chart-header {
        padding: 12px;
    }

    .chart-header h4 {
        font-size: 14px;
    }

    /* Analytics Filters */
    .analytics-filters select {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Profile */
    .profile-section {
        padding: 16px;
    }

    .profile-info h3 {
        font-size: 18px;
    }

    .profile-info p {
        font-size: 13px;
    }

    /* Login Modal */
    .login-header {
        padding: 24px 16px 16px;
    }

    .login-logo-image {
        height: 40px;
    }

    .login-logo-text {
        font-size: 24px;
    }

    .login-header h2 {
        font-size: 20px;
    }

    .login-description {
        padding: 12px 16px 0;
    }

    .login-description p {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .btn-google {
        font-size: 14px;
        padding: 12px;
    }

    /* Empty State */
    .empty-state {
        padding: 40px 20px;
    }

    .empty-state-icon {
        font-size: 48px;
    }

    .empty-state h3 {
        font-size: 18px;
    }

    .empty-state p {
        font-size: 13px;
    }
}

/* ================================
   RESPONSIVE DESIGN - EXTRA SMALL
   ================================ */

@media (max-width: 360px) {
    .page-container {
        padding: 12px;
    }

    .stat-card {
        padding: 10px;
    }

    .stat-value {
        font-size: 20px;
    }

    .link-card {
        padding: 10px;
    }

    .filter-tab {
        padding: 6px 10px;
        font-size: 11px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ================================
   RESPONSIVE DESIGN - LANDSCAPE
   ================================ */

@media (max-height: 600px) and (orientation: landscape) {
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .sidebar {
        overflow-y: auto;
    }

    .login-modal {
        max-height: 95vh;
        overflow-y: auto;
    }
}

/* ================================
   TOUCH DEVICE OPTIMIZATIONS
   ================================ */

@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn,
    .btn-icon,
    .icon-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .filter-tab {
        min-height: 40px;
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .btn-icon:hover,
    .link-card:hover {
        transform: none;
    }

    /* Improve scrolling */
    .links-container,
    .filter-tabs,
    .analytics-grid {
        -webkit-overflow-scrolling: touch;
    }
}

/* ================================
   LANDING PAGE STYLES
   ================================ */

.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, #0B1120 0%, #050A14 50%, #0B1120 100%);
    overflow-y: auto;
    z-index: 9999;
}

/* Landing Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 17, 32, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 157, 184, 0.1);
}

.landing-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-logo-image {
    height: 32px;
}

.landing-logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.landing-nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.landing-nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.landing-nav-item:hover {
    color: var(--text-primary);
}

.landing-nav-github {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.landing-nav-github:hover {
    color: var(--text-primary);
}

.landing-btn-primary {
    background: #3B82F6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.landing-btn-primary:hover {
    background: #60A5FA;
    transform: translateY(-1px);
}

/* Landing Hero */
.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 80px;
    position: relative;
    overflow: hidden;
}

.landing-hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 40px;
    cursor: pointer;
    transition: all 0.3s;
}

.landing-badge:hover {
    background: rgba(59, 130, 246, 0.15);
    transform: translateX(4px);
}

.landing-title {
    font-size: clamp(48px, 7vw, 84px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.landing-gradient-text {
    background: linear-gradient(135deg, #3B82F6 0%, #0EA5E9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-description {
    font-size: clamp(18px, 2.5vw, 24px);
    color: var(--text-secondary);
    margin-bottom: 50px;
    line-height: 1.6;
}

.landing-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3B82F6, #0EA5E9);
    color: white;
    padding: 4px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95em;
}

.landing-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.landing-btn-hero {
    background: #3B82F6;
    color: white;
    padding: 18px 36px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.landing-btn-hero:hover {
    background: #60A5FA;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5);
}

.landing-btn-secondary {
    background: rgba(139, 157, 184, 0.05);
    color: var(--text-primary);
    padding: 18px 36px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border: 1px solid rgba(139, 157, 184, 0.1);
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.landing-btn-secondary:hover {
    background: rgba(139, 157, 184, 0.1);
    transform: translateY(-2px);
}

/* Landing Background */
.landing-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.landing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: landingFloat 25s infinite ease-in-out;
}

.landing-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 70%);
    top: -250px;
    right: -250px;
}

.landing-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3), transparent 70%);
    bottom: -200px;
    left: -200px;
    animation-delay: 8s;
}

.landing-orb-3 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2), transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 16s;
}

@keyframes landingFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

/* Responsive Landing */
@media (max-width: 768px) {
    .landing-nav-container {
        padding: 16px 20px;
    }
    
    .landing-nav-menu {
        display: none;
    }
    
    .landing-hero {
        padding: 100px 20px 60px;
    }
    
    .landing-title {
        font-size: 42px;
    }
    
    .landing-description {
        font-size: 18px;
    }
    
    .landing-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .landing-btn-hero,
    .landing-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Landing Suggestions Section */
.landing-suggestions {
    padding: 80px 40px;
    background: rgba(11, 17, 32, 0.5);
    border-top: 1px solid rgba(139, 157, 184, 0.1);
}

.landing-suggestions-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.landing-suggestions-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 40px;
    line-height: 1.3;
}

.landing-suggestions-form {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.landing-suggestions-input {
    flex: 1;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 157, 184, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
}

.landing-suggestions-input:focus {
    outline: none;
    border-color: #3B82F6;
    background: rgba(255, 255, 255, 0.08);
}

.landing-suggestions-input::placeholder {
    color: var(--text-tertiary);
}

.landing-suggestions-btn {
    padding: 16px 32px;
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

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

@media (max-width: 768px) {
    .landing-suggestions {
        padding: 60px 20px;
    }
    
    .landing-suggestions-form {
        flex-direction: column;
    }
    
    .landing-suggestions-btn {
        justify-content: center;
    }
}

/* ================================
   QR GENERATOR PAGE STYLES
   ================================ */

.qr-generator-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    padding: 0;
}

.qr-input-section,
.qr-customization-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qr-card {
    background: rgba(11, 17, 32, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 157, 184, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
}

.qr-card:hover {
    border-color: rgba(139, 157, 184, 0.25);
    transform: translateY(-2px);
}

.qr-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-card h3 i {
    color: var(--primary);
    font-size: 20px;
}

/* QR Preview */
.qr-preview-card {
    position: sticky;
    top: 20px;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating minimized QR preview */
.qr-floating-preview {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 220px;
    min-width: 150px;
    max-width: 400px;
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(6, 182, 212, 0.5);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transform: translateX(-300px) translateY(-50%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    cursor: move;
    resize: both;
    overflow: hidden;
}

.qr-floating-preview.show {
    opacity: 1;
    transform: translateX(0) translateY(-50%);
    pointer-events: auto;
}

.qr-floating-preview.dragging {
    transition: none;
    cursor: grabbing;
}

.qr-floating-preview.resizing {
    transition: none;
}

.qr-floating-preview .resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(6, 182, 212, 0.5) 50%);
    border-bottom-right-radius: 14px;
    z-index: 10;
}

.qr-floating-preview .resize-handle:hover {
    background: linear-gradient(135deg, transparent 50%, rgba(6, 182, 212, 0.8) 50%);
}

.qr-floating-preview .floating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    cursor: grab;
    user-select: none;
}

.qr-floating-preview.dragging .floating-header {
    cursor: grabbing;
}

.qr-floating-preview .floating-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.qr-floating-preview .floating-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.qr-floating-preview .floating-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.qr-floating-preview .floating-qr-container {
    width: 100%;
    aspect-ratio: 1;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.qr-floating-preview canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 8px;
    object-fit: contain;
}

html[data-theme="light"] .qr-floating-preview {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(6, 182, 212, 0.4);
}

.qr-preview-card.compact {
    top: 20px;
}

.qr-preview-card.compact .qr-preview-container {
    min-height: 250px;
    padding: 20px;
}

.qr-preview-card.compact #qrCanvas {
    width: 200px !important;
    height: 200px !important;
}

.qr-preview-card.compact h3 {
    font-size: 14px;
}

.qr-preview-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 40px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-canvas-wrapper {
    position: relative;
    display: inline-block;
}

#qrCanvas {
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-brand-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
    max-width: 140px;
    text-align: center;
    word-wrap: break-word;
}

#qrPlaceholder {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 16px;
}

/* Quick Links */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.quick-link-btn {
    padding: 12px 16px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-link-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--primary);
    transform: translateX(4px);
}

.quick-link-btn .quick-link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.quick-link-btn .link-short {
    font-weight: 600;
    color: var(--primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-link-btn .link-clicks {
    font-size: 11px;
    color: #10B981;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.quick-link-btn .link-clicks i {
    font-size: 10px;
}

.quick-link-btn .link-original {
    font-size: 12px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pattern Grid */
.qr-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
}

.pattern-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(139, 157, 184, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pattern-option:hover {
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.05);
}

.pattern-option.active {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
}

.pattern-preview {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Pattern Previews - Visual representations */
.pattern-square { background: repeating-linear-gradient(0deg, #333 0px, #333 8px, transparent 8px, transparent 16px), repeating-linear-gradient(90deg, #333 0px, #333 8px, transparent 8px, transparent 16px); }
.pattern-dots { background-image: radial-gradient(circle, #333 30%, transparent 30%); background-size: 12px 12px; }
.pattern-rounded { background: repeating-linear-gradient(0deg, #333 0px, #333 8px, transparent 8px, transparent 16px), repeating-linear-gradient(90deg, #333 0px, #333 8px, transparent 8px, transparent 16px); border-radius: 6px; }
.pattern-extra-rounded { background: repeating-linear-gradient(0deg, #333 0px, #333 8px, transparent 8px, transparent 16px), repeating-linear-gradient(90deg, #333 0px, #333 8px, transparent 8px, transparent 16px); border-radius: 10px; }
.pattern-classy { background: repeating-conic-gradient(#333 0deg 90deg, transparent 90deg 180deg); background-size: 16px 16px; }
.pattern-classy-rounded { background: repeating-conic-gradient(#333 0deg 90deg, transparent 90deg 180deg); background-size: 16px 16px; border-radius: 8px; }
.pattern-circular { background-image: radial-gradient(circle, #333 40%, transparent 40%); background-size: 14px 14px; }
.pattern-diamond { background-image: repeating-linear-gradient(45deg, #333 0px, #333 6px, transparent 6px, transparent 12px), repeating-linear-gradient(-45deg, #333 0px, #333 6px, transparent 6px, transparent 12px); }
.pattern-star { background: radial-gradient(ellipse at center, #333 20%, transparent 20%), radial-gradient(ellipse at center, transparent 40%, #333 40%, #333 45%, transparent 45%); background-size: 16px 16px; }
.pattern-bars { background: repeating-linear-gradient(0deg, #333 0px, #333 6px, transparent 6px, transparent 12px); }
.pattern-thick { background: repeating-linear-gradient(0deg, #333 0px, #333 12px, transparent 12px, transparent 20px), repeating-linear-gradient(90deg, #333 0px, #333 12px, transparent 12px, transparent 20px); }
.pattern-thin { background: repeating-linear-gradient(0deg, #333 0px, #333 3px, transparent 3px, transparent 10px), repeating-linear-gradient(90deg, #333 0px, #333 3px, transparent 3px, transparent 10px); }
.pattern-fluid { background: linear-gradient(45deg, #333 25%, transparent 25%, transparent 75%, #333 75%, #333), linear-gradient(-45deg, #333 25%, transparent 25%, transparent 75%, #333 75%, #333); background-size: 16px 16px; }
.pattern-mosaic { background: conic-gradient(from 45deg, #333 0deg 90deg, transparent 90deg 180deg, #333 180deg 270deg, transparent 270deg 360deg); background-size: 16px 16px; }
.pattern-leaf { background: radial-gradient(ellipse 40% 60% at 50% 40%, #333 50%, transparent 50%); background-size: 14px 14px; }

.pattern-option span {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
}

/* Frame Grid */
.frame-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.frame-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(139, 157, 184, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.frame-option:hover {
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.05);
}

.frame-option.active {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
}

.frame-preview {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    position: relative;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-none { border: 2px solid transparent; }
.frame-business { border: 4px solid #3B82F6; border-radius: 8px; }
.frame-wedding { border: 4px solid #EC4899; border-radius: 50%; }
.frame-birthday { border: 4px solid #F59E0B; border-radius: 12px; background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%); }
.frame-party { border: 4px dashed #8B5CF6; border-radius: 8px; }
.frame-concert { border: 4px solid #EF4444; border-radius: 4px; box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
.frame-conference { border: 4px double #06b6d4; border-radius: 8px; }
.frame-restaurant { border: 4px solid #10B981; border-radius: 16px; }
.frame-retail { border: 4px solid #8B5CF6; border-radius: 8px; background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%); }
.frame-social { border: 4px solid #3B82F6; border-radius: 50%; background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%); }

.frame-option span {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
}

/* Color Picker */
.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-slider {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-slider label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 60px;
    height: 45px;
    border: 2px solid rgba(139, 157, 184, 0.2);
    border-radius: var(--radius-md);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-input-group input[type="color"]:hover {
    border-color: var(--primary);
}

.color-hex {
    flex: 1;
    text-transform: uppercase;
}

.color-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-preset {
    width: 45px;
    height: 45px;
    border: 2px solid rgba(139, 157, 184, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Download Options */
.download-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.download-format label,
.download-background label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
}

.format-buttons {
    display: flex;
    gap: 12px;
}

.format-btn {
    flex: 1;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(139, 157, 184, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.format-btn:hover {
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.05);
}

.format-btn.active {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive QR Generator */
@media (max-width: 1024px) {
    .qr-generator-container {
        grid-template-columns: 1fr;
    }
    
    .qr-preview-card {
        position: relative;
        top: 0;
    }
    
    .qr-pattern-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .frame-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

@media (max-width: 768px) {
    .qr-card {
        padding: 20px;
    }
    
    .qr-preview-container {
        padding: 20px;
        min-height: 300px;
    }
    
    #qrCanvas {
        max-width: 100%;
        height: auto;
    }
    
    .qr-pattern-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .pattern-preview {
        width: 40px;
        height: 40px;
    }
    
    .frame-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .frame-preview {
        width: 50px;
        height: 50px;
    }
}
