/**
 * CorPhoeniX Main Stylesheet
 * Consolidated and optimized - v2.0
 * 
 * Sections:
 * 1. CSS Variables & Reset
 * 2. Animations
 * 3. Base Layout
 * 4. Components (Buttons, Forms, Messages)
 * 5. Clock Styles
 * 6. Search & Weather
 * 7. Bookmarks
 * 8. Services Grid
 * 9. Modals
 * 10. Settings
 * 11. Admin Styles
 * 12. Light Mode Improvements
 * 13. Dark Mode
 * 14. Responsive
 * 15. Utilities
 */

/* ============================================
   1. CSS VARIABLES & RESET
   ============================================ */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --accent-yellow: #feca57;
    --accent-red: #ff6b6b;
    --accent-blue: #48dbfb;
    --accent-pink: #ff9ff3;
    --success-green: #4CAF50;
    --warning-orange: #ff9800;
    --danger-red: #f44336;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-hover: rgba(255, 255, 255, 0.15);
    --text-primary: white;
    --text-muted: rgba(255, 255, 255, 0.8);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 12px 40px rgba(0, 0, 0, 0.2);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 15px;
    --radius-xl: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
}

/* ============================================
   2. ANIMATIONS
   ============================================ */

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

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(254, 202, 87, 0.5); }
    50% { box-shadow: 0 0 20px rgba(254, 202, 87, 0.8), 0 0 30px rgba(254, 202, 87, 0.6); }
}

.fade-in { animation: fadeIn var(--transition-normal); }
.fade-out { animation: fadeOut var(--transition-normal); }
.pulse { animation: pulse 2s ease-in-out infinite; }
.spin { animation: spin 1s linear infinite; }

/* ============================================
   3. BASE LAYOUT
   ============================================ */

.container {
    text-align: center;
    max-width: 900px;
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-light);
    margin: 1rem;
}

@media (min-width: 900px) { .container { max-width: 1000px; } }
@media (min-width: 1200px) { .container { max-width: 1400px; } }

.header { text-align: center; margin-bottom: 1rem; }

.logo {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--accent-red), var(--accent-yellow), var(--accent-blue), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.user-info-section {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.user-info { opacity: 0.9; margin-right: 1rem; }

.logout-link {
    color: var(--accent-yellow);
    text-decoration: none;
    opacity: 0.8;
    transition: all var(--transition-normal);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.logout-link:hover {
    opacity: 1;
    border-bottom-color: var(--accent-yellow);
}

.footer { margin-top: 2rem; opacity: 0.7; font-size: 0.9rem; }

.copyright {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Loading States */
.loading-container { text-align: center; padding: 2rem; }
.loading-content { margin-top: 3rem; }
.loading-spinner-large {
    font-size: 4rem;
    animation: pulse 2s ease-in-out infinite;
    margin-bottom: 1rem;
}
.loading-spinner { display: inline-block; animation: spin 1s linear infinite; }

/* ============================================
   4. COMPONENTS
   ============================================ */

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-small);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.btn:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
.btn:focus { outline: 2px solid rgba(254, 202, 87, 0.7); outline-offset: 2px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: rgba(254, 202, 87, 0.3); border: 1px solid rgba(254, 202, 87, 0.5); }
.btn-primary:hover:not(:disabled) { background: rgba(254, 202, 87, 0.5); }

.btn-danger { background: rgba(255, 107, 107, 0.3); border: 1px solid rgba(255, 107, 107, 0.5); }
.btn-danger:hover:not(:disabled) { background: rgba(255, 107, 107, 0.5); }

.btn-warning { background: rgba(255, 193, 7, 0.3); border: 1px solid rgba(255, 193, 7, 0.5); }
.btn-warning:hover:not(:disabled) { background: rgba(255, 193, 7, 0.5); }

.btn-secondary { background: rgba(108, 117, 125, 0.3); border: 1px solid rgba(108, 117, 125, 0.5); }
.btn-secondary:hover:not(:disabled) { background: rgba(108, 117, 125, 0.5); }

.btn-success { background: rgba(76, 175, 80, 0.3); border: 1px solid rgba(76, 175, 80, 0.5); }
.btn-success:hover:not(:disabled) { background: rgba(76, 175, 80, 0.5); }

.btn-small { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-large { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-full { width: 100%; justify-content: center; }

/* Forms */
.form-group { margin-bottom: 1rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; opacity: 0.9; font-weight: 500; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-small);
    background: var(--glass-bg);
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-normal);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255, 255, 255, 0.6); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(254, 202, 87, 0.7);
    background: var(--glass-hover);
    box-shadow: 0 0 0 3px rgba(254, 202, 87, 0.2);
}

.form-group select option { background: #2d3748; color: white; }
.form-group textarea { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-actions { display: flex; gap: 1rem; justify-content: flex-start; flex-wrap: wrap; }
.form-actions.center { justify-content: center; }

/* Messages */
.error-message,
.success-message {
    padding: 0.8rem;
    border-radius: var(--radius-small);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.error-message {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
}

.success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.error-message.fade-out,
.success-message.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-online { background-color: var(--success-green); box-shadow: 0 0 6px rgba(76, 175, 80, 0.6); }
.status-offline { background-color: var(--danger-red); box-shadow: 0 0 6px rgba(244, 67, 54, 0.6); }
.status-warning { background-color: var(--warning-orange); box-shadow: 0 0 6px rgba(255, 152, 0, 0.6); }

/* ============================================
   5. CLOCK STYLES
   ============================================ */

.digital-clock {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: var(--glass-hover);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-large);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-light);
    z-index: 1000;
    text-align: center;
    transition: all var(--transition-normal);
}

.digital-clock:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.clock-day { font-size: 0.9rem; font-weight: 600; opacity: 0.8; letter-spacing: 1px; margin-bottom: 0.25rem; }
.clock-date { font-size: 0.8rem; opacity: 0.7; margin-bottom: 0.5rem; }
.clock-time { font-size: 1.2rem; font-weight: bold; color: var(--accent-yellow); text-shadow: 0 2px 8px rgba(254, 202, 87, 0.3); }

.analog-clock {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 120px;
    height: 120px;
    background: var(--glass-hover);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    box-shadow: var(--shadow-light);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.analog-clock:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.clock-face {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clock-numbers { position: absolute; width: 100%; height: 100%; }

.number {
    position: absolute;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    opacity: 0.8;
}

.number[data-number="12"] { top: 5px; left: 50%; transform: translateX(-50%); }
.number[data-number="3"] { right: 8px; top: 50%; transform: translateY(-50%); }
.number[data-number="6"] { bottom: 5px; left: 50%; transform: translateX(-50%); }
.number[data-number="9"] { left: 8px; top: 50%; transform: translateY(-50%); }

.clock-hands { position: absolute; width: 100%; height: 100%; }

.hand {
    position: absolute;
    background: white;
    border-radius: 2px;
    transform-origin: bottom center;
    left: 50%;
    bottom: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hour-hand { width: 3px; height: 25px; margin-left: -1.5px; background: var(--accent-yellow); z-index: 3; }
.minute-hand { width: 2px; height: 35px; margin-left: -1px; z-index: 2; }
.second-hand { width: 1px; height: 40px; margin-left: -0.5px; background: var(--accent-red); z-index: 4; }

.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--accent-yellow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    box-shadow: 0 2px 8px rgba(254, 202, 87, 0.4);
}

/* ============================================
   6. SEARCH & WEATHER
   ============================================ */

.search-container { margin-bottom: 2rem; }

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: var(--glass-hover);
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.search-box:hover,
.search-box:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-light);
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: white;
    font-size: 1rem;
    outline: none;
}

.search-box input::placeholder { color: rgba(255, 255, 255, 0.7); }

.search-box button {
    padding: 12px 20px;
    border: none;
    background: rgba(254, 202, 87, 0.2);
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box button:hover { background: rgba(254, 202, 87, 0.3); transform: scale(1.05); }

/* Weather Widget */
.weather-widget {
    max-width: 400px;
    margin: 0 auto 2rem;
    background: var(--glass-hover);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.weather-widget:hover { background: rgba(255, 255, 255, 0.2); box-shadow: var(--shadow-light); }
.weather-loading { text-align: center; color: var(--text-muted); font-size: 1rem; }
.weather-content { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.weather-main { display: flex; align-items: center; gap: 1rem; }
.weather-icon { font-size: 3rem; }
.weather-info h3 { margin: 0; font-size: 1.5rem; }
.weather-info p { margin: 0.25rem 0 0; opacity: 0.8; text-transform: capitalize; }
.weather-details { text-align: right; font-size: 0.9rem; opacity: 0.8; }
.weather-location { font-size: 0.8rem; opacity: 0.7; text-align: center; margin-top: 0.5rem; }

/* Wellbeing Section */
.wellbeing-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
    justify-content: center;
}

.wellbeing-inner { display: flex; gap: 1rem; justify-content: center; align-items: stretch; }

.wellbeing-card {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-medium);
    padding: 0.75rem 1.25rem;
    height: 100%;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    color: white;
}

.wellbeing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-yellow);
}

.wellbeing-card h3 { margin: 0; font-size: 1.05rem; font-weight: 500; }

.card-content { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card-icons { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; align-items: center; justify-content: center; }

.icon-person-wrapper { position: relative; width: 1.5em; height: 1.5em; display: inline-block; }

.icon-person-stand,
.icon-person-flex {
    font-size: 1.5rem;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.icon-person-stand { opacity: 1; transform: scale(1); }
.icon-person-flex { opacity: 0; transform: scale(0.8); }
.icon-brain { font-size: 1.5rem; opacity: 0; transform: scale(0.8); transition: opacity var(--transition-normal), transform var(--transition-normal); }

.wellbeing-card:hover .icon-person-stand { opacity: 0; transform: scale(0.8); }
.wellbeing-card:hover .icon-person-flex { opacity: 1; transform: scale(1); }
.wellbeing-card:hover .icon-brain { opacity: 1; transform: scale(1); }

/* ============================================
   7. BOOKMARKS
   ============================================ */

.bookmarks-section { margin: 2rem 0; text-align: center; }
.bookmarks-header { display: flex; justify-content: center; align-items: center; margin-bottom: 2rem; gap: 1rem; }
.bookmarks-header h3 { font-size: 1.3rem; margin: 0; }

.bookmarks-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.bookmark-shortcut {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: all var(--transition-normal);
    cursor: pointer;
    padding: 0.5rem;
    padding-top: 1.25rem;
    border-radius: var(--radius-medium);
    width: 80px;
    height: 90px;
}

.bookmark-shortcut:hover { background: var(--glass-bg); transform: translateY(-2px); }

/* Bookmark Drag Handle */
.bookmark-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    border-radius: var(--radius-medium) var(--radius-medium) 0 0;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.3);
    transition: all var(--transition-normal);
    user-select: none;
    opacity: 0;
}

.bookmark-shortcut:hover .bookmark-drag-handle {
    opacity: 1;
}

.bookmark-drag-handle:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: rgba(255, 255, 255, 0.7);
}

.bookmark-drag-handle:active {
    cursor: grabbing;
}

/* Bookmark drag states */
.bookmark-shortcut.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.bookmark-shortcut.drag-over {
    background: rgba(254, 202, 87, 0.2);
    border: 2px dashed var(--accent-yellow);
}

.bookmark-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

.bookmark-icon-container {
    position: relative;
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: var(--radius-medium);
    overflow: hidden;
}

.bookmark-favicon { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; }

.bookmark-favicon-fallback {
    width: 32px;
    height: 32px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.bookmark-title {
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.2;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
}

.bookmark-menu-trigger {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 10;
    transition: all 0.2s ease;
}

.bookmark-shortcut:hover .bookmark-menu-trigger { display: flex; }
.bookmark-menu-trigger:hover { background: rgba(0, 0, 0, 0.9); transform: scale(1.1); }

.bookmark-menu {
    position: absolute;
    top: 25px;
    right: 0;
    background: rgba(40, 40, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-small);
    padding: 0.5rem 0;
    min-width: 120px;
    display: none;
    z-index: 100;
    box-shadow: var(--shadow-medium);
}

.bookmark-menu.active { display: block; }

.bookmark-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
    width: 100%;
    text-align: left;
    transition: background 0.2s ease;
}

.bookmark-menu-item:hover { background: var(--glass-bg); }

.add-shortcut-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-medium);
    width: 80px;
    height: 80px;
    transition: all var(--transition-normal);
    background: none;
    border: none;
    color: white;
}

.add-shortcut-btn:hover { background: var(--glass-bg); transform: translateY(-2px); }

.add-shortcut-icon {
    width: 48px;
    height: 48px;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 0.5rem;
    transition: all var(--transition-normal);
}

.add-shortcut-btn:hover .add-shortcut-icon {
    border-color: rgba(255, 255, 255, 0.8);
    background: var(--glass-bg);
}

.add-shortcut-text { font-size: 0.75rem; text-align: center; opacity: 0.7; transition: opacity var(--transition-normal); }
.add-shortcut-btn:hover .add-shortcut-text { opacity: 1; }

.bookmarks-empty {
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-medium);
    border: 2px dashed var(--glass-border);
}

/* ============================================
   8. SERVICES GRID
   ============================================ */

.services {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
    place-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 600px) { .services { grid-template-columns: repeat(2, minmax(200px, 300px)); } }
@media (min-width: 900px) { .services { grid-template-columns: repeat(3, minmax(200px, 300px)); } }
@media (min-width: 1200px) { .services { grid-template-columns: repeat(4, minmax(200px, 300px)); } }

.service-card {
    background: var(--glass-hover);
    padding: 1.5rem;
    padding-top: 2.5rem;
    border-radius: var(--radius-large);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), opacity var(--transition-normal);
    width: 100%;
    max-width: 300px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-medium); }
.service-card h3 { margin: 0; font-size: 1.1rem; text-align: center; }
.service-links { display: flex; flex-direction: column; gap: 0.5rem; }

.service-card a {
    color: var(--accent-yellow);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-small);
    transition: all var(--transition-normal);
    background: var(--glass-bg);
    border: 1px solid rgba(254, 202, 87, 0.3);
}

.service-card a:hover {
    background: rgba(254, 202, 87, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 202, 87, 0.3);
}

.admin-link {
    background: rgba(255, 107, 107, 0.15) !important;
    border-color: rgba(255, 107, 107, 0.3) !important;
    color: var(--accent-red) !important;
}

.admin-link:hover {
    background: rgba(255, 107, 107, 0.25) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3) !important;
}

/* Admin Panel Card */
.admin-panel-card {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 152, 0, 0.15) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    position: relative;
    overflow: hidden;
}

/* Service Card Drag Handle */
.card-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-large) var(--radius-large) 0 0;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    transition: all var(--transition-normal);
    user-select: none;
    opacity: 0;
}

.service-card:hover .card-drag-handle {
    opacity: 1;
}

.card-drag-handle:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    color: rgba(255, 255, 255, 0.8);
}

.card-drag-handle:active {
    cursor: grabbing;
}

/* Drag states */
.service-card.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.service-card.drag-over {
    border: 2px dashed var(--accent-yellow);
    background: rgba(254, 202, 87, 0.1);
    transform: translateY(0) !important;
}

.service-card.drag-over::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(254, 202, 87, 0.05);
    border-radius: var(--radius-large);
    pointer-events: none;
}

/* Drag placeholder */
.drag-placeholder {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-large);
    min-height: 150px;
}

.admin-panel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffc107, #ff9800);
}

.admin-panel-card:hover {
    box-shadow: 0 12px 40px rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.2) 100%);
}

.admin-panel-card h3 { color: #ffc107; font-weight: 600; }
.admin-panel-card .service-links a { border-color: rgba(255, 193, 7, 0.4); background: rgba(255, 193, 7, 0.1); color: #ffc107; }

.admin-panel-card .service-links a:hover {
    background: rgba(255, 193, 7, 0.25);
    border-color: rgba(255, 193, 7, 0.6);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.admin-panel-card::after {
    content: 'ADMIN';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 193, 7, 0.4);
    letter-spacing: 0.5px;
}

/* ============================================
   9. MODALS
   ============================================ */

.modal,
.bookmark-modal,
.rename-modal,
.admin-modal,
.settings-modal,
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active,
.bookmark-modal.active,
.rename-modal.active,
.admin-modal.active,
.settings-modal.active,
.help-modal.active { display: flex; }

.modal-content,
.bookmark-modal-content,
.rename-modal-content,
.admin-modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-large);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content h3,
.modal-content h4,
.bookmark-modal-content h4,
.rename-modal-content h4,
.admin-modal-content h3 {
    margin-bottom: 1.5rem;
    color: white;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-normal);
}

.modal-close:hover { opacity: 1; }

.rename-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-small);
    background: var(--glass-bg);
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.rename-input:focus {
    outline: none;
    border-color: rgba(254, 202, 87, 0.7);
    background: var(--glass-hover);
}

.rename-buttons { display: flex; gap: 1rem; justify-content: center; }

/* ============================================
   10. SETTINGS & HELP MODALS
   ============================================ */

.settings-icon {
    position: fixed !important;
    bottom: 4.5rem !important;
    right: 1.5rem !important;
    z-index: 998;
    background: var(--glass-hover);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.settings-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) rotate(30deg);
}

.settings-modal-content,
.help-modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.settings-header,
.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.settings-header h3,
.help-header h3 { margin: 0; font-size: 1.3rem; }

.settings-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--glass-border);
}

.settings-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
    border-bottom: 3px solid transparent;
}

.settings-tab:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.settings-tab.active { background: var(--glass-bg); color: var(--accent-yellow); border-bottom-color: var(--accent-yellow); }

.settings-content { padding: 2rem; max-height: 60vh; overflow-y: auto; }
.settings-tab-content { display: none; }
.settings-tab-content.active { display: block; }
.settings-section { margin-bottom: 2rem; }
.settings-section h4 { margin-bottom: 0.5rem; color: var(--accent-yellow); }
.settings-description { opacity: 0.7; font-size: 0.9rem; margin-bottom: 1.5rem; }

.help-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-medium);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid var(--glass-border);
}

.help-info h5 { color: var(--accent-yellow); margin-bottom: 1rem; font-size: 1rem; }
.help-info ul { list-style: none; padding: 0; margin: 0; }
.help-info li { color: var(--text-muted); margin-bottom: 0.5rem; font-size: 0.9rem; position: relative; padding-left: 1.2rem; }
.help-info li::before { content: '💡'; position: absolute; left: 0; top: 0; }

.help-modal-content form { padding: 2rem; }
.help-modal-content .form-group { margin-bottom: 1.5rem; }
.help-modal-content textarea { min-height: 120px; }

/* Theme Toggle */
.theme-toggle {
    position: fixed !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    z-index: 999;
    background: var(--glass-hover);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 0.25rem;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.theme-icon { font-size: 1rem; padding: 0.25rem; user-select: none; }

.theme-switch { position: relative; width: 50px; height: 26px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }

.theme-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.4s;
    border-radius: 34px;
}

.theme-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .theme-slider { background-color: var(--accent-yellow); }
input:checked + .theme-slider::before { transform: translateX(24px); }

/* ============================================
   11. ADMIN STYLES
   ============================================ */

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.admin-logo {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--accent-red), var(--accent-yellow), var(--accent-blue), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-controls { display: flex; align-items: center; gap: 1rem; }
.admin-user-info { font-size: 0.9rem; opacity: 0.9; }

.admin-login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.admin-login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-light);
}

.admin-login-card h2 { margin-bottom: 0.5rem; font-size: 1.5rem; }
.admin-login-card p { margin-bottom: 2rem; opacity: 0.8; }

.admin-footer-link {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.admin-footer-link a { color: var(--accent-yellow); text-decoration: none; font-size: 0.9rem; }
.admin-footer-link a:hover { text-decoration: underline; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-large);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    text-align: center;
    transition: transform var(--transition-normal);
}

.stat-card:hover { transform: translateY(-5px); }
.stat-card h3 { font-size: 0.9rem; opacity: 0.8; margin-bottom: 0.5rem; }
.stat-number { font-size: 2rem; font-weight: bold; color: var(--accent-yellow); }

.admin-actions { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }

.users-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-large);
    border: 1px solid var(--glass-border);
    padding: 2rem;
}

.users-section h2 { margin-bottom: 1.5rem; font-size: 1.3rem; }

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.admin-table th,
.admin-table td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-table th {
    background: var(--glass-bg);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.05); }
.admin-table .user-id { font-family: monospace; opacity: 0.7; }

.user-status,
.user-role {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active { background: rgba(76, 175, 80, 0.3); color: var(--success-green); }
.status-banned { background: rgba(244, 67, 54, 0.3); color: var(--danger-red); }
.role-admin { background: rgba(255, 193, 7, 0.3); color: #ffc107; }
.role-user { background: rgba(33, 150, 243, 0.3); color: #2196F3; }

.user-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.user-actions .btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.bookmark-count { font-weight: bold; color: var(--accent-yellow); }

/* Admin Modal Row Layout */
.admin-modal .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.admin-modal .form-group { margin-bottom: 1rem; text-align: left; }
.admin-modal .form-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.admin-modal .admin-modal-content span { font-weight: bold; color: var(--accent-yellow); }

/* Auth Container */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--glass-bg);
    border-radius: var(--radius-large);
    border: 1px solid var(--glass-border);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-switch { text-align: center; margin-top: 1rem; font-size: 0.9rem; }
.auth-switch a { color: var(--accent-yellow); text-decoration: none; cursor: pointer; }
.auth-switch a:hover { text-decoration: underline; }

/* ============================================
   12. LIGHT MODE IMPROVEMENTS
   ============================================ */

/* Service card link colors for light mode - using deeper, eye-friendly colors */
.service-card a {
    color: #1e5f74; /* Deep teal - excellent contrast and easy on eyes */
    text-shadow: none;
}

.service-card a:hover {
    color: #134b5c;
}

.admin-link {
    color: #7a2048 !important; /* Deep wine/burgundy */
}

.admin-link:hover {
    color: #5c1836 !important;
}

/* Admin Panel Card light mode - special colors for yellow-tinted background */
.admin-panel-card h3 {
    color: #5c4a1f; /* Deep bronze/brown that works on yellow */
    text-shadow: none;
}

.admin-panel-card .service-links a {
    color: #1e5f74; /* Consistent deep teal */
}

.admin-panel-card .service-links a:hover {
    color: #134b5c;
}

.admin-panel-card::after {
    color: #5c4a1f;
    background: rgba(92, 74, 31, 0.15);
    border-color: rgba(92, 74, 31, 0.3);
}

/* Clock colors for light mode */
.digital-clock {
    color: #2d3748; /* Dark slate for general text */
}

.clock-day,
.clock-date {
    color: #4a5568; /* Slightly lighter slate */
}

.clock-time {
    color: #1e5f74; /* Deep teal to match service links */
    text-shadow: 0 1px 3px rgba(30, 95, 116, 0.2);
}

/* Analog clock hands for light mode */
.hour-hand {
    background: #1e5f74;
}

.minute-hand {
    background: #2d3748;
}

.second-hand {
    background: #7a2048;
}

.clock-center {
    background: #1e5f74;
    box-shadow: 0 2px 8px rgba(30, 95, 116, 0.3);
}

.number {
    color: #2d3748;
}

/* Light mode drag handle */
.card-drag-handle {
    color: rgba(45, 55, 72, 0.5);
}

.card-drag-handle:hover {
    color: rgba(45, 55, 72, 0.8);
}

.service-card.drag-over {
    border-color: #1e5f74;
    background: rgba(30, 95, 116, 0.1);
}

/* Light mode bookmark drag handle */
.bookmark-drag-handle {
    color: rgba(45, 55, 72, 0.3);
}

.bookmark-drag-handle:hover {
    color: rgba(45, 55, 72, 0.7);
}

.bookmark-shortcut.drag-over {
    background: rgba(30, 95, 116, 0.15);
    border-color: #1e5f74;
}

/* ============================================
   13. DARK MODE
   ============================================ */

body.dark-mode {
    background: var(--dark-gradient);
    color: #e0e0e0;
}

body.dark-mode .container,
body.dark-mode .auth-container,
body.dark-mode .digital-clock,
body.dark-mode .analog-clock,
body.dark-mode .weather-widget,
body.dark-mode .service-card,
body.dark-mode .stat-card,
body.dark-mode .admin-login-card,
body.dark-mode .users-section,
body.dark-mode .settings-icon,
body.dark-mode .theme-toggle { 
    background: rgba(0, 0, 0, 0.4); 
    border-color: rgba(255, 255, 255, 0.1); 
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea,
body.dark-mode .rename-input {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus,
body.dark-mode .rename-input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(254, 202, 87, 0.7);
}

body.dark-mode .form-group select option { background: #1a1a2e; color: #e0e0e0; }

body.dark-mode .bookmark-shortcut:hover,
body.dark-mode .add-shortcut-btn:hover { background: rgba(255, 255, 255, 0.05); }

body.dark-mode .bookmark-icon-container,
body.dark-mode .add-shortcut-icon { background: rgba(0, 0, 0, 0.3); }

body.dark-mode .bookmark-menu,
body.dark-mode .modal-content,
body.dark-mode .bookmark-modal-content,
body.dark-mode .rename-modal-content,
body.dark-mode .admin-modal-content,
body.dark-mode .settings-modal-content,
body.dark-mode .help-modal-content {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .modal,
body.dark-mode .bookmark-modal,
body.dark-mode .rename-modal,
body.dark-mode .admin-modal,
body.dark-mode .settings-modal,
body.dark-mode .help-modal { background: rgba(0, 0, 0, 0.8); }

body.dark-mode .search-box { background: rgba(0, 0, 0, 0.4); border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .search-box:hover,
body.dark-mode .search-box:focus-within { background: rgba(0, 0, 0, 0.6); }
body.dark-mode .search-box input { color: #e0e0e0; }
body.dark-mode .search-box button { background: rgba(254, 202, 87, 0.15); }

body.dark-mode .error-message { background: rgba(255, 107, 107, 0.15); border-color: rgba(255, 107, 107, 0.3); }
body.dark-mode .success-message { background: rgba(76, 175, 80, 0.15); border-color: rgba(76, 175, 80, 0.3); }

body.dark-mode .admin-table { background: rgba(0, 0, 0, 0.2); }
body.dark-mode .admin-table th { background: rgba(0, 0, 0, 0.4); }
body.dark-mode .admin-table tbody tr:hover { background: rgba(255, 255, 255, 0.05); }
body.dark-mode .table-container { background: rgba(0, 0, 0, 0.2); }

body.dark-mode .settings-tabs { background: rgba(0, 0, 0, 0.3); }
body.dark-mode .settings-tab { color: rgba(255, 255, 255, 0.6); }
body.dark-mode .settings-tab:hover { background: rgba(255, 255, 255, 0.05); }
body.dark-mode .settings-tab.active { background: var(--glass-bg); color: var(--accent-yellow); }
body.dark-mode .help-info { background: rgba(0, 0, 0, 0.3); }

body.dark-mode .bookmarks-empty { background: rgba(0, 0, 0, 0.2); border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode .copyright { border-top-color: rgba(255, 255, 255, 0.1); }

/* Restore bright colors for service cards in dark mode */
body.dark-mode .service-card a {
    color: var(--accent-yellow);
    text-shadow: none;
}

body.dark-mode .service-card a:hover {
    color: var(--accent-yellow);
}

body.dark-mode .admin-link {
    color: var(--accent-red) !important;
}

body.dark-mode .admin-link:hover {
    color: var(--accent-red) !important;
}

body.dark-mode .admin-panel-card h3 {
    color: #ffc107;
    text-shadow: none;
}

body.dark-mode .admin-panel-card .service-links a {
    color: #ffc107;
}

body.dark-mode .admin-panel-card::after {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.4);
}

/* Restore clock colors in dark mode */
body.dark-mode .digital-clock {
    color: white;
}

body.dark-mode .clock-day,
body.dark-mode .clock-date {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .clock-time {
    color: var(--accent-yellow);
    text-shadow: 0 2px 8px rgba(254, 202, 87, 0.3);
}

body.dark-mode .hour-hand {
    background: var(--accent-yellow);
}

body.dark-mode .minute-hand {
    background: white;
}

body.dark-mode .second-hand {
    background: var(--accent-red);
}

body.dark-mode .clock-center {
    background: var(--accent-yellow);
    box-shadow: 0 2px 8px rgba(254, 202, 87, 0.4);
}

body.dark-mode .number {
    color: white;
}

/* Dark mode drag handle styles */
body.dark-mode .card-drag-handle {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .card-drag-handle:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
}

body.dark-mode .service-card.drag-over {
    border-color: var(--accent-yellow);
    background: rgba(254, 202, 87, 0.05);
}

body.dark-mode .theme-slider { background-color: rgba(255, 255, 255, 0.2) !important; }
body.dark-mode .theme-slider::before { background-color: #e0e0e0 !important; }

/* ============================================
   14. RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .container { margin: 1rem; padding: 1.5rem; }
    .logo { font-size: 2rem; }
    
    .digital-clock { top: 1rem; left: 1rem; padding: 0.75rem 1rem; }
    .clock-time { font-size: 1rem; }
    .analog-clock { top: 1rem; right: 1rem; width: 100px; height: 100px; }
    .hour-hand { height: 20px; }
    .minute-hand { height: 28px; }
    .second-hand { height: 32px; }
    
    .search-box { max-width: 100%; margin: 0 1rem; }
    .search-box input,
    .search-box button { padding: 10px 15px; font-size: 0.9rem; }
    
    .wellbeing-section { flex-direction: column; }
    .wellbeing-card,
    .weather-widget { max-width: 100%; }
    
    .weather-content { flex-direction: column; text-align: center; }
    .weather-details { text-align: center; margin-top: 0.5rem; }
    
    .bookmarks-grid { gap: 1rem; padding: 0 0.5rem; }
    .bookmark-shortcut,
    .add-shortcut-btn { width: 70px; height: 70px; }
    .bookmark-icon-container { width: 40px; height: 40px; }
    .bookmark-favicon,
    .bookmark-favicon-fallback { width: 28px; height: 28px; }
    .add-shortcut-icon { width: 40px; height: 40px; font-size: 20px; }
    .bookmark-title,
    .add-shortcut-text { font-size: 0.65rem; }
    
    .form-row { grid-template-columns: 1fr; }
    .btn { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
    
    .modal-content,
    .bookmark-modal-content,
    .rename-modal-content,
    .admin-modal-content { padding: 1.5rem; margin: 1rem; }
    
    .admin-container { padding: 1rem; }
    .admin-header { flex-direction: column; gap: 1rem; text-align: center; }
    .admin-controls { flex-wrap: wrap; justify-content: center; }
    .admin-logo { font-size: 2rem; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-table { font-size: 0.8rem; }
    .admin-table th,
    .admin-table td { padding: 0.5rem 0.25rem; }
    .admin-modal .form-row { grid-template-columns: 1fr; }
    
    .settings-icon { bottom: 3.5rem !important; right: 1rem !important; width: 40px; height: 40px; }
    .settings-tabs { flex-direction: column; }
    .settings-tab { padding: 0.75rem 1rem; border-bottom: 1px solid var(--glass-border); border-right: 3px solid transparent; }
    .settings-tab.active { border-right-color: var(--accent-yellow); }
    
    .theme-toggle { bottom: 1rem !important; right: 1rem !important; padding: 0.2rem; gap: 0.3rem; }
    .theme-icon { font-size: 0.9rem; }
    .theme-switch { width: 40px; height: 22px; }
    .theme-slider::before { height: 16px; width: 16px; }
    input:checked + .theme-slider::before { transform: translateX(18px); }
}

@media (max-width: 480px) {
    .logo { font-size: 1.8rem; }
    .container { padding: 1rem; }
    
    .digital-clock { top: 0.5rem; left: 0.5rem; padding: 0.5rem 0.75rem; }
    .clock-day { font-size: 0.7rem; }
    .clock-date { font-size: 0.65rem; }
    .clock-time { font-size: 0.9rem; }
    .analog-clock { top: 0.5rem; right: 0.5rem; width: 80px; height: 80px; }
    .number { font-size: 0.6rem; }
    .hour-hand { height: 16px; }
    .minute-hand { height: 22px; }
    .second-hand { height: 26px; }
    .clock-center { width: 6px; height: 6px; }
    
    .search-box { margin: 0 0.5rem; }
    .weather-widget { margin: 0 0.5rem 2rem; padding: 0.75rem; }
    .weather-icon { font-size: 2.5rem; }
    .weather-info h3 { font-size: 1.3rem; }
    
    .btn { padding: 0.5rem 1rem; font-size: 0.8rem; }
    .btn-small { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
    .form-group input,
    .form-group select,
    .form-group textarea { padding: 0.6rem; font-size: 0.9rem; }
    
    .admin-stats { grid-template-columns: 1fr; }
    .stat-card { padding: 1rem; }
    .stat-number { font-size: 1.5rem; }
    .admin-modal-content { padding: 1rem; }
    .admin-modal-content h3 { font-size: 1.1rem; }
    
    .settings-icon { bottom: 3.25rem !important; right: 0.75rem !important; width: 36px; height: 36px; font-size: 0.9rem; }
    .theme-toggle { bottom: 0.75rem !important; right: 0.75rem !important; }
}

@media (max-width: 320px) {
    .digital-clock,
    .analog-clock { display: none; }
    
    .settings-icon { bottom: 3rem !important; right: 0.5rem !important; width: 32px; height: 32px; font-size: 0.8rem; }
    .theme-toggle { bottom: 0.5rem !important; right: 0.5rem !important; transform: scale(0.9); }
    .theme-toggle:hover { transform: scale(0.9) translateY(-2px); }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   15. UTILITIES
   ============================================ */

.hidden { display: none !important; }

.auth-container.hidden,
#mainContent.hidden,
.loading-container.hidden {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
