/* assets/css/style.css */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e1b4b;
    --gray: #6b7280;
    --light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 40px rgba(0,0,0,0.1);
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 25px 60px rgba(0,0,0,0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 50px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* ========== HOME PAGE ========== */
.hero {
    min-height: 100vh;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 4px 30px rgba(0,0,0,0.2);
}

.hero-content h1 span {
    background: linear-gradient(120deg, #ffd700, #ffed4a, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: var(--transition);
}

.hero-nav.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 3rem;
}

.hero-nav .logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-nav.scrolled .logo {
    color: var(--primary);
}

.hero-nav .nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.hero-nav .nav-links a {
    /* color: rgba(255,255,255,0.9); */
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: var(--transition);
}

.hero-nav.scrolled .nav-links a {
    color: #333;
}

.hero-nav .nav-links a:hover {
    background: rgba(255,255,255,0.2);
}

.hero-nav.scrolled .nav-links a:hover {
    background: var(--primary);
    color: white;
}

/* Floating shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    background: white;
}

.shape-1 { width: 300px; height: 300px; top: -100px; right: -50px; animation: float 6s ease-in-out infinite; }
.shape-2 { width: 200px; height: 200px; bottom: -50px; left: -50px; animation: float 8s ease-in-out infinite; }
.shape-3 { width: 150px; height: 150px; top: 40%; left: 10%; animation: float 7s ease-in-out infinite 1s; }
.shape-4 { width: 100px; height: 100px; top: 20%; right: 20%; animation: float 5s ease-in-out infinite 0.5s; }

/* Features Section */
.features {
    padding: 6rem 2rem;
    background: white;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    padding: 2.5rem;
    border-radius: var(--radius);
    background: var(--light);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.feature-card .icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.7;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.btn-white {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========== AUTH PAGES ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.auth-container {
    background: white;
    border-radius: var(--radius);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease;
}

.auth-container .logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-container .logo-section h1 {
    font-size: 2rem;
    color: var(--dark);
    margin-top: 0.5rem;
}

.auth-container .logo-section .logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: var(--light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    background: white;
}

.form-control::placeholder {
    color: #9ca3af;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.input-icon .form-control {
    padding-left: 3rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========== ALERTS ========== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    animation: fadeInUp 0.4s ease;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ========== DASHBOARD ========== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--dark);
    color: white;
    padding: 2rem 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 50;
    transition: var(--transition);
}

.sidebar .sidebar-logo {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.sidebar .sidebar-logo h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.sidebar .sidebar-logo .logo-dot {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0 0.8rem;
}

.sidebar-menu li {
    margin-bottom: 0.3rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(139, 92, 246, 0.2);
    color: white;
}

.sidebar-menu a.active {
    background: var(--primary);
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 1rem 1.5rem;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 2rem;
    background: #f1f5f9;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.2rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.top-bar h1 {
    font-size: 1.5rem;
    color: var(--dark);
}

.top-bar .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar .user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.top-bar .profile-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.top-bar .profile-link:hover {
    background: var(--primary);
    color: white;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.8rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card.views::before { background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.stat-card.clicks::before { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.links-count::before { background: linear-gradient(90deg, var(--accent), #fbbf24); }
.stat-card.ctr::before { background: linear-gradient(90deg, var(--danger), #f87171); }

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.stat-card.views .stat-icon { background: rgba(139,92,246,0.1); color: var(--primary); }
.stat-card.clicks .stat-icon { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-card.links-count .stat-icon { background: rgba(245,158,11,0.1); color: var(--accent); }
.stat-card.ctr .stat-icon { background: rgba(239,68,68,0.1); color: var(--danger); }

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-card .stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* Links Management */
.links-section {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.links-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.links-section .section-header h2 {
    font-size: 1.3rem;
    color: var(--dark);
}

.link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    transition: var(--transition);
    cursor: grab;
    border: 2px solid transparent;
}

.link-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.link-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.link-item .drag-handle {
    color: var(--gray);
    cursor: grab;
    font-size: 1.2rem;
    padding: 0.3rem;
}

.link-item .link-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.link-item .link-info {
    flex: 1;
    min-width: 0;
}

.link-item .link-info h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 0.2rem;
}

.link-item .link-info p {
    font-size: 0.8rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-item .link-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.link-item .link-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.link-item .link-actions a,
.link-item .link-actions button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.link-item .link-actions .edit-btn {
    background: rgba(139,92,246,0.1);
    color: var(--primary);
}

.link-item .link-actions .edit-btn:hover {
    background: var(--primary);
    color: white;
}

.link-item .link-actions .delete-btn {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
}

.link-item .link-actions .delete-btn:hover {
    background: var(--danger);
    color: white;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    border-radius: 26px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* ========== PROFILE PAGE ========== */
.profile-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.profile-container {
    max-width: 680px;
    width: 100%;
    text-align: center;
    padding: 3rem 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.3);
    margin-bottom: 1rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.profile-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.6);
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.profile-bio {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.social-icons a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
}

.social-icons a:hover {
    transform: translateY(-3px) scale(1.1);
    background: rgba(255,255,255,0.3);
}

/* Profile Link Buttons */
.profile-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.profile-link-btn {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    gap: 1rem;
}

.profile-link-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.profile-link-btn:hover::before {
    left: 100%;
}

.profile-link-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.profile-link-btn:active {
    transform: scale(0.98);
}

.profile-link-btn .link-btn-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.profile-link-btn .link-btn-text {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.profile-link-btn .link-btn-arrow {
    opacity: 0;
    transition: var(--transition);
}

.profile-link-btn:hover .link-btn-arrow {
    opacity: 1;
}

/* Button Styles */
.btn-style-rounded {
    border-radius: var(--radius-full) !important;
}

.btn-style-square {
    border-radius: 0 !important;
}

.btn-style-rounded-sm {
    border-radius: var(--radius-sm) !important;
}

.btn-style-outline {
    background: transparent !important;
    border: 2px solid;
}

.btn-style-shadow {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* ========== APPEARANCE PAGE ========== */
.appearance-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.appearance-form {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.appearance-form h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--light);
}

.color-picker-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-picker-group input[type="color"] {
    width: 50px;
    height: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    padding: 3px;
}

.color-picker-group input[type="text"] {
    flex: 1;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.theme-option {
    height: 80px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    position: relative;
}

.theme-option:hover {
    transform: scale(1.05);
}

.theme-option.active {
    border-color: var(--dark);
}

.theme-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.button-style-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.button-style-option {
    padding: 1rem;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
    background: var(--light);
}

.button-style-option:hover {
    border-color: var(--primary);
}

.button-style-option.active {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
}

.button-style-option.rounded { border-radius: var(--radius-full); }
.button-style-option.square { border-radius: 0; }
.button-style-option.rounded-sm { border-radius: var(--radius-sm); }
.button-style-option.shadow { border-radius: var(--radius-sm); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }

/* Preview Phone */
.phone-preview {
    position: sticky;
    top: 2rem;
}

.phone-frame {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    border: 8px solid #1a1a2e;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #1a1a2e;
    padding-top: 30px;
    position: relative;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: #333;
    border-radius: 3px;
}

.phone-screen {
    width: 100%;
    height: 580px;
    overflow-y: auto;
    padding: 2rem 1rem;
    text-align: center;
}

.phone-screen::-webkit-scrollbar {
    width: 0;
}

/* ========== ANALYTICS ========== */
.analytics-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.analytics-card h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.click-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: var(--light);
    border-radius: var(--radius-sm);
}

.click-bar .bar-label {
    width: 150px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.click-bar .bar-fill-container {
    flex: 1;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.click-bar .bar-fill {
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 1s ease;
    min-width: 5%;
}

.click-bar .bar-value {
    width: 60px;
    text-align: right;
    font-weight: 600;
    color: var(--dark);
}

/* ========== SETTINGS PAGE ========== */
.settings-form {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    max-width: 700px;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--radius-sm);
}

.avatar-upload img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.avatar-upload .upload-btn {
    cursor: pointer;
}

.avatar-upload input[type="file"] {
    display: none;
}

/* ========== 404 PAGE ========== */
.page-404 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    text-align: center;
    color: white;
}

.page-404 h1 {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    opacity: 0.3;
}

.page-404 h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.page-404 p {
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* ========== SELECT STYLES ========== */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ========== ICON PICKER ========== */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

.icon-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    color: var(--gray);
}

.icon-option:hover {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
}

.icon-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========== FOOTER ========== */
.profile-footer {
    margin-top: 3rem;
    opacity: 0.6;
    font-size: 0.85rem;
}

.profile-footer a {
    text-decoration: none;
    font-weight: 600;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-nav {
        padding: 1rem 1.5rem;
    }

    .hero-nav .nav-links {
        display: none;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .appearance-grid {
        grid-template-columns: 1fr;
    }

    .phone-preview {
        order: -1;
    }

    .top-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .link-item {
        flex-wrap: wrap;
    }

    .mobile-menu-btn {
        display: block !important;
    }

    .icon-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .auth-container {
        padding: 2rem 1.5rem;
    }

    .theme-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile menu button - hidden by default */
.mobile-menu-btn {
    display: none;
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    cursor: pointer;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 60;
    box-shadow: var(--shadow);
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 40;
}

.sidebar-overlay.active {
    display: block;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}