/* ClickLinks Dashboard - Modern Design */
/* Blue Gradient Theme, Clean, Mobile-First */

:root {
    --blue-600: #4F46E5;
    --blue-700: #4338CA;
    --cyan-500: #06B6D4;
    --cyan-600: #0891B2;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.dashboard-container {
    max-width: 900px;
}

/* Typography */
h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
    margin-top: 32px;
}

h2:first-child {
    margin-top: 0;
}

/* Navigation */
nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
    margin-bottom: 32px;
}

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

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--blue-600);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 15px;
    border: 1px solid;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border-color: #A7F3D0;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border-color: #FECACA;
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border-color: #FDE68A;
}

/* Forms */
.settings-form {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-section {
    padding-bottom: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--gray-200);
}

.settings-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.section-description {
    color: var(--gray-700);
    font-size: 14px;
    margin-bottom: 20px;
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    color: var(--gray-700);
    font-size: 13px;
    margin-top: 6px;
}

.form-group input[type="file"] {
    padding: 8px 0;
    border: none;
}

/* Gradient Picker */
.gradient-picker {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--gray-200);
}

.gradient-preview {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

.color-input-group input[type="color"] {
    width: 60px;
    height: 44px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    padding: 4px;
}

.color-input-group .color-hex {
    flex: 1;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    background: var(--white);
}

/* Profile/Banner Preview */
.profile-preview,
.banner-preview {
    margin-bottom: 16px;
}

.profile-photo-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gray-200);
    margin-bottom: 12px;
    display: block;
}

.banner-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 12px;
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

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

.form-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Links Table */
.links-table {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.links-table th,
.links-table td {
    padding: 16px;
    text-align: left;
}

.links-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.links-table tr {
    border-bottom: 1px solid var(--gray-100);
}

.links-table tr:last-child {
    border-bottom: none;
}

.links-table tr:hover {
    background: var(--gray-50);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    nav .container {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .settings-form {
        padding: 24px 20px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .gradient-controls {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-section {
    animation: fadeIn 0.4s ease-out;
}

/* ============================================
   NAVBAR STYLE - Material Design Inspired
   ============================================ */

nav {
    background: var(--white);
    border-bottom: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.08);
    padding: 0;
    margin-bottom: 32px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    height: 64px;
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-brand::before {
    content: '🔗';
    font-size: 28px;
    -webkit-text-fill-color: initial;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    list-style: none;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    display: inline-block;
    position: relative;
}

.nav-links a:hover {
    background: var(--gray-100);
    color: var(--blue-600);
}

.nav-links a.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(6, 182, 212, 0.1));
    color: var(--blue-600);
    font-weight: 600;
}

.nav-links a.btn-logout {
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 600;
    margin-left: 8px;
}

.nav-links a.btn-logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-700);
    padding: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    nav .container {
        padding: 0 16px;
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 16px 0;
        border-top: 1px solid var(--gray-200);
        margin-top: 16px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        width: 100%;
        padding: 12px 16px;
        border-radius: 0;
    }
    
    .nav-links a.btn-logout {
        margin-left: 0;
        margin-top: 8px;
        border-radius: 8px;
    }
}

/* Dropdown effect */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links.active {
    animation: slideDown 0.3s ease-out;
}

/* Profile/Banner Upload Preview */
.profile-upload-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.current-profile-image {
    position: relative;
    max-width: 200px;
}

.current-profile-image img {
    width: 100%;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.current-profile-image button {
    margin-top: 8px;
}

/* Navigation Logo */
.nav-logo {
    height: 36px;
    width: auto;
}

/* Site Footer */
.site-footer {
    background: #f8fafc;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.site-footer a {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: #4F46E5;
}

.site-footer strong {
    color: #1e293b;
}

/* Navigation Logo - Responsive */
.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .nav-logo {
        height: 32px;
        max-width: 120px;
    }
}

/* Navbar Button Styles */
.btn-live {
    background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%) !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
}

.btn-logout-text {
    color: #ef4444 !important;
    font-weight: 500 !important;
}

.btn-logout-text:hover {
    color: #dc2626 !important;
}

/* Remove old gradient logout button */
.btn-logout {
    background: none !important;
    color: #ef4444 !important;
}
