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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient, linear-gradient(135deg, #1e3c72 0%, #2a5298 100%));
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    color: white;
    margin: 0;
    padding: 0;
}

/* CSS Variables for Themes */
:root {
    --bg-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: white;
    --primary-color: rgba(74, 144, 226, 1);
    --primary-color-80: rgba(74, 144, 226, 0.8);
    --primary-color-60: rgba(74, 144, 226, 0.6);
    --primary-color-40: rgba(74, 144, 226, 0.4);
    --primary-color-20: rgba(74, 144, 226, 0.2);
}

/* Theme Definitions */
body.theme-ocean {
    --bg-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --primary-color: rgba(42, 82, 152, 1);
    --primary-color-80: rgba(42, 82, 152, 0.8);
    --primary-color-60: rgba(42, 82, 152, 0.6);
    --primary-color-40: rgba(42, 82, 152, 0.4);
    --primary-color-20: rgba(42, 82, 152, 0.2);
}

body.theme-sunset {
    --bg-gradient: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.25);
    --primary-color: rgba(255, 126, 95, 1);
    --primary-color-80: rgba(255, 126, 95, 0.8);
    --primary-color-60: rgba(255, 126, 95, 0.6);
    --primary-color-40: rgba(255, 126, 95, 0.4);
    --primary-color-20: rgba(255, 126, 95, 0.2);
}

body.theme-forest {
    --bg-gradient: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
    --glass-bg: rgba(255, 255, 255, 0.18);
    --glass-border: rgba(255, 255, 255, 0.22);
    --primary-color: rgba(113, 178, 128, 1);
    --primary-color-80: rgba(113, 178, 128, 0.8);
    --primary-color-60: rgba(113, 178, 128, 0.6);
    --primary-color-40: rgba(113, 178, 128, 0.4);
    --primary-color-20: rgba(113, 178, 128, 0.2);
}

body.theme-purple {
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --primary-color: rgba(118, 75, 162, 1);
    --primary-color-80: rgba(118, 75, 162, 0.8);
    --primary-color-60: rgba(118, 75, 162, 0.6);
    --primary-color-40: rgba(118, 75, 162, 0.4);
    --primary-color-20: rgba(118, 75, 162, 0.2);
}

body.theme-rose {
    --bg-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.25);
    --primary-color: rgba(245, 87, 108, 1);
    --primary-color-80: rgba(245, 87, 108, 0.8);
    --primary-color-60: rgba(245, 87, 108, 0.6);
    --primary-color-40: rgba(245, 87, 108, 0.4);
    --primary-color-20: rgba(245, 87, 108, 0.2);
}

body.theme-dark {
    --bg-gradient: linear-gradient(135deg, #0c0c0c 0%, #2d2d2d 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.15);
    --primary-color: rgba(100, 100, 100, 1);
    --primary-color-80: rgba(100, 100, 100, 0.8);
    --primary-color-60: rgba(100, 100, 100, 0.6);
    --primary-color-40: rgba(100, 100, 100, 0.4);
    --primary-color-20: rgba(100, 100, 100, 0.2);
}

body.theme-arctic {
    --bg-gradient: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    --glass-bg: rgba(0, 0, 0, 0.1);
    --glass-border: rgba(0, 0, 0, 0.15);
    --text-color: #2c3e50;
    color: #2c3e50;
    --primary-color: rgba(186, 231, 255, 1);
    --primary-color-80: rgba(186, 231, 255, 0.8);
    --primary-color-60: rgba(186, 231, 255, 0.6);
    --primary-color-40: rgba(186, 231, 255, 0.4);
    --primary-color-20: rgba(186, 231, 255, 0.2);
}

body.theme-midnight {
    --bg-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --primary-color: rgba(26, 26, 46, 1);
    --primary-color-80: rgba(26, 26, 46, 0.8);
    --primary-color-60: rgba(26, 26, 46, 0.6);
    --primary-color-40: rgba(26, 26, 46, 0.4);
    --primary-color-20: rgba(26, 26, 46, 0.2);
}

body.theme-charcoal {
    --bg-gradient: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.15);
    --primary-color: rgba(44, 44, 44, 1);
    --primary-color-80: rgba(44, 44, 44, 0.8);
    --primary-color-60: rgba(44, 44, 44, 0.6);
    --primary-color-40: rgba(44, 44, 44, 0.4);
    --primary-color-20: rgba(44, 44, 44, 0.2);
}

body.theme-navy {
    --bg-gradient: linear-gradient(135deg, #0a1828 0%, #178582 100%);
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.18);
    --primary-color: rgba(23, 133, 130, 1);
    --primary-color-80: rgba(23, 133, 130, 0.8);
    --primary-color-60: rgba(23, 133, 130, 0.6);
    --primary-color-40: rgba(23, 133, 130, 0.4);
    --primary-color-20: rgba(23, 133, 130, 0.2);
}

body.theme-steel {
    --bg-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --primary-color: rgba(52, 73, 94, 1);
    --primary-color-80: rgba(52, 73, 94, 0.8);
    --primary-color-60: rgba(52, 73, 94, 0.6);
    --primary-color-40: rgba(52, 73, 94, 0.4);
    --primary-color-20: rgba(52, 73, 94, 0.2);
}

body.theme-cobalt {
    --bg-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --primary-color: rgba(59, 130, 246, 1);
    --primary-color-80: rgba(59, 130, 246, 0.8);
    --primary-color-60: rgba(59, 130, 246, 0.6);
    --primary-color-40: rgba(59, 130, 246, 0.4);
    --primary-color-20: rgba(59, 130, 246, 0.2);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    grid-template-areas: 
        "."
        "search"
        "links";
    gap: 1rem;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
}

.time-section {
    position: absolute;
    top: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.search-section {
    grid-area: search;
    justify-self: center;
    margin-top: -6.5rem;
    position: relative;
    z-index: 1;
}

.quick-links {
    grid-area: links;
    justify-self: center;
    width: 100%;
    max-width: 900px;
    margin-top: -2rem;
}

/* Top Controls */
.top-controls {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 180px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.25rem 0;
}

/* Edit Mode Panel */
.edit-panel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    z-index: 1002;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.edit-panel.active {
    right: 0;
}

.edit-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1;
}

.edit-panel-header h3 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

.edit-panel h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-section {
    margin-bottom: 2rem;
    padding: 0 1.5rem;
}

.edit-section:first-of-type {
    margin-top: 1.5rem;
}

.edit-section:last-of-type {
    margin-bottom: 5rem;
}

.edit-section h4 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edit-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.edit-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: left;
}

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

.edit-btn.editing {
    background: rgba(74, 144, 226, 0.2);
    color: rgba(74, 144, 226, 1);
}

.edit-btn i {
    transition: transform 0.3s ease;
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

.edit-btn.editing i {
    transform: rotate(45deg);
}

/* Profile Button */
.profile-btn {
    background: var(--theme-color, rgba(255, 255, 255, 0.15));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.875rem;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.profile-btn:hover {
    background: var(--theme-color-hover, rgba(255, 255, 255, 0.25));
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--theme-color, rgba(0, 0, 0, 0.15));
}

.profile-btn.logged-in {
    background: var(--theme-color, rgba(74, 144, 226, 0.8));
    border-color: var(--theme-color, rgba(74, 144, 226, 0.9));
    box-shadow: 0 0 25px var(--theme-color, rgba(74, 144, 226, 0.4));
}

.profile-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: #dc3545;
}

.profile-indicator.online {
    background: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
}

.profile-indicator.syncing {
    background: #ffc107;
    animation: pulse 1.5s infinite;
    will-change: transform, opacity;
}

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

/* Refresh Button (in dropdown) */
.dropdown-item#refreshBtn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    width: 100%;
    text-align: left;
}

.dropdown-item#refreshBtn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-item#refreshBtn.syncing {
    color: rgba(255, 193, 7, 1);
}

.dropdown-item#refreshBtn.syncing i {
    animation: spin 1s linear infinite;
    will-change: transform;
}

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

/* Theme Selector */
.theme-selector {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.theme-selector label {
    color: var(--text-color);
    font-weight: 500;
}

.theme-selector select {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    color: #333;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Enhanced form controls for edit panel */
.edit-input, .edit-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.edit-input:focus, .edit-select:focus {
    outline: none;
    border-color: var(--theme-color, var(--primary-color-60));
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px var(--theme-color, var(--primary-color-20));
}

.edit-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.edit-select option {
    background: rgba(0, 0, 0, 0.95);
    color: white;
}

.edit-button {
    background: var(--theme-color, var(--primary-color-80));
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.edit-button:hover {
    background: var(--theme-color-hover, var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--theme-color, var(--primary-color-40));
}

.edit-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.edit-button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Time and Date Section */
.time-section {
    text-align: center;
    margin-bottom: 0;
}

.time {
    font-size: 4.2rem;
    font-weight: 300;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

.date {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.greeting {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 300;
    line-height: 1.4;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    max-width: 800px;
}

.greeting:empty:before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Search Section */
.search-section {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.search-container {
    background: var(--glass-bg);
    backdrop-filter: none; /* Remove blur effect */
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

.search-box {
    width: 100%;
    margin-bottom: 1.5rem;
    position: relative;
}

.search-engine-tabs {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: nowrap;
    width: 100%;
    position: relative;
}

.search-tab {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0.6rem 0.5rem;
    cursor: pointer;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    justify-content: center;
    /* Removed backdrop-filter blur */
}

.search-tab i {
    font-size: 1rem;
}

.search-tab span {
    font-size: 0.8rem;
    font-weight: 500;
}

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

.search-tab.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

#searchInput {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    font-size: 1rem;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    /* Removed backdrop-filter blur on input for cleaner look */
}

#searchInput::placeholder {
    color: #555;
    opacity: 1;
    font-weight: 400;
}

#searchInput:focus {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    text-align: left;
}

/* Quick Links Section */
.quick-links {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.links-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.9;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    width: max-content;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
    max-width: 900px;
    width: 100%;
    max-height: calc(100vh - 550px);
    overflow: visible;
    margin-top: 3rem;
}

/* Consistent sizing for all link items */



.link-item {
    position: relative;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90px;
    width: 100%;
}

.remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(207, 109, 16, 0.9);
    color: white;
    border: none;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 10;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(204, 85, 0, 0.4);
}

.remove-btn[style*="block"] {
    display: flex !important;
}

.remove-btn:hover {
    background: rgba(204, 85, 0, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(204, 85, 0, 0.6);
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.link-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-8px);
    color: white;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.link-card:hover::before {
    opacity: 1;
}

.link-icon {
    font-size: 1.5rem;
    opacity: 0.9;
}

.link-name {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.9;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Weather Widget */
.weather-widget {
    position: absolute;
    bottom: 1rem;
    left: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: opacity 0.3s ease;
}

.weather-widget.loading {
    opacity: 0.6;
    pointer-events: none;
}

.weather-widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.weather-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    cursor: grab;
    user-select: none;
}

.weather-info:active {
    cursor: grabbing;
}

.weather-icon {
    font-size: 2rem;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.weather-temp {
    font-size: 1.5rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.weather-desc {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 300;
    text-transform: capitalize;
    margin: 0.2rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.weather-location {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 300;
    cursor: pointer;
    transition: opacity 0.3s ease;
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 180px;
    text-align: center;
}

.weather-location:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Reminder Widget */
.reminder-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 350px;
    height: 500px;
    max-height: 80vh;
    min-height: 300px;
    min-width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 100;
    resize: both;
    display: flex;
    flex-direction: column;
}

/* Quick Links Widget */
.quicklinks-widget {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 500;
    max-width: 90vw;
    max-height: 80vh;
    min-width: 300px;
    width: 700px;
    resize: both;
    overflow: auto;
}

.quicklinks-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem 0;
    position: relative;
    cursor: grab;
    user-select: none;
}

.quicklinks-header:active {
    cursor: grabbing;
}

.quicklinks-header .links-title {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin: 0;
    padding: 0;
    line-height: 1;
    position: static;
    transform: none;
    z-index: auto;
    pointer-events: auto;
    width: auto;
    cursor: inherit;
}

.quicklinks-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

/* Resize handle styling for quicklinks widget */
.quicklinks-widget::-webkit-resizer {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 20px 0;
}

/* Resize handle styling for reminder widget */
.reminder-widget::-webkit-resizer {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 16px 0;
}

/* Draggable Widget Styles */
.draggable-widget {
    cursor: default;
}

.draggable-widget.dragging {
    opacity: 0.8;
    cursor: move;
    z-index: 9999 !important;
}

.widget-drag-handle {
    cursor: grab;
}

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

.drag-icon {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-right: 0.5rem;
    cursor: grab;
}

.drag-icon:active {
    cursor: grabbing;
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    cursor: grab;
    user-select: none;
}

.reminder-header:active {
    cursor: grabbing;
}

.reminder-header h4 {
    margin: 0;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: inherit;
}

.reminder-add-btn {
    background: var(--primary-color-80);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.reminder-add-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 15px var(--primary-color-40);
}

.reminder-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    min-height: 0;
}

.reminder-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.reminder-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.reminder-item.priority-high {
    border-left: 4px solid #ff4757;
}

.reminder-item.priority-medium {
    border-left: 4px solid #ffa502;
}

.reminder-item.priority-low {
    border-left: 4px solid #2ed573;
}

.reminder-item.completed {
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.03);
}

.reminder-text.completed {
    text-decoration: line-through;
    opacity: 0.7;
}

.reminder-date.overdue {
    color: #ff4757;
    font-weight: 500;
}

.reminder-text {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

.reminder-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    opacity: 0.7;
    color: white;
}

.reminder-date {
    color: rgba(255, 255, 255, 0.8);
}

.reminder-actions {
    display: flex;
    gap: 0.25rem;
}

.reminder-action-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

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

.reminder-action-btn.delete:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.2);
}

.no-reminders {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* City Selection Dropdown */
.city-dropdown {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-top: 0.75rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

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

.city-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.city-search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.city-search-input:focus {
    outline: none;
    border-color: var(--theme-color, rgba(255, 255, 255, 0.4));
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px var(--theme-color, rgba(255, 255, 255, 0.2));
}

.city-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.close-city-dropdown {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.close-city-dropdown:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.city-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
}

.city-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.city-dropdown-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.city-dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.city-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.city-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-option:last-child {
    margin-bottom: 0;
}

.city-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(3px);
}

.city-name {
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.city-details {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.city-dropdown-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.save-location-btn {
    width: 100%;
    background: var(--theme-color, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.save-location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

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

/* Reminder Modal */
.reminder-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.reminder-modal.active {
    display: flex;
}

.reminder-modal-content {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 90%;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.reminder-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0;
}

.reminder-modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reminder-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

.reminder-modal-body {
    padding: 1.5rem;
}

.reminder-input-group {
    margin-bottom: 1.5rem;
}

.reminder-input-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.reminder-input, .reminder-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.reminder-input:focus, .reminder-select:focus {
    outline: none;
    border-color: var(--primary-color-60);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px var(--primary-color-20);
}

.reminder-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.reminder-select option {
    background: rgba(0, 0, 0, 0.95);
    color: white;
}

.reminder-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem 1.5rem;
    justify-content: flex-end;
}

.reminder-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.reminder-btn.primary {
    background: var(--primary-color-80);
    border-color: var(--primary-color);
}

.reminder-btn:hover {
    transform: translateY(-1px);
}

.reminder-btn.primary:hover {
    background: var(--primary-color);
    box-shadow: 0 4px 15px var(--primary-color-40);
}

.reminder-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Profile Modal */
/* Profile Panel (Side Panel like Edit Panel) */
.profile-panel {
    position: fixed;
    top: 0;
    right: -480px;
    width: 450px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(30px);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
}

.profile-panel.active {
    right: 0;
}

.profile-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(30px);
    z-index: 1;
}

.profile-panel-header h3 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.02em;
}

.profile-panel-header h3 i {
    font-size: 1rem;
    color: #4a90e2;
}

/* Profile Tabs (Excel-style) */
.profile-tabs {
    display: flex;
    gap: 0;
    background: rgba(0, 0, 0, 0.3);
    padding: 0;
    overflow-x: auto;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-tab {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0;
    position: relative;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    flex: 1;
}

.profile-tab i {
    font-size: 0.9rem;
}

.profile-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.profile-tab.active {
    background: rgba(0, 0, 0, 0.95);
    color: #4a90e2;
    border-bottom: 2px solid #4a90e2;
}

.profile-tab.active i {
    color: #4a90e2;
}

/* Profile Tab Content */
.profile-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.profile-tab-content.active {
    display: block;
}

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

.profile-panel-content {
    flex: 1;
    overflow-y: auto;
}

.profile-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin: 0 1.5rem 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.auth-tab.active {
    background: var(--primary-color-80);
    color: white;
    box-shadow: 0 2px 10px var(--primary-color-40);
}

.auth-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Auth Content */
.profile-auth-form {
    padding: 0;
}

.auth-content {
    display: none;
    padding: 0 1.5rem 1.5rem;
}

.auth-content.active {
    display: block;
}

.profile-input-group {
    margin-bottom: 1.5rem;
}

#updatePasswordGroup {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

#updatePasswordGroup label {
    color: rgba(255, 200, 100, 0.9);
    font-weight: 600;
}

.profile-input-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.profile-input-group small {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    margin-top: 0.25rem;
}

.profile-input, .profile-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.profile-input:focus, .profile-select:focus {
    outline: none;
    border-color: var(--primary-color-60);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px var(--primary-color-20);
}

.profile-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.profile-input[readonly] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    color: rgba(255, 255, 255, 0.8);
}

.profile-input[readonly]:focus {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.profile-select option {
    background: rgba(0, 0, 0, 0.95);
    color: white;
}

/* Checkbox */
.profile-checkbox-group {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 0.8rem;
    user-select: none;
}

.checkbox-label:hover .checkmark {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color-80);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1;
}

/* Profile Buttons */
.auth-actions {
    display: flex;
    gap: 1rem;
    justify-content: stretch;
}

.profile-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-btn.primary {
    background: var(--primary-color-80);
    border-color: var(--primary-color);
}

.profile-btn.secondary {
    background: rgba(108, 117, 125, 0.3);
    border-color: rgba(108, 117, 125, 0.5);
    backdrop-filter: blur(10px);
}

.profile-btn.danger {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.5);
    backdrop-filter: blur(10px);
}

.profile-btn.small {
    padding: 0.4rem 0.85rem;
    font-size: 0.7rem;
    flex: none;
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.profile-btn.primary:hover {
    background: var(--theme-color-hover, var(--primary-color));
    box-shadow: 0 4px 15px var(--theme-color, var(--primary-color-40));
}

.profile-btn.secondary:hover {
    background: rgba(108, 117, 125, 0.6);
    border-color: rgba(108, 117, 125, 0.8);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.profile-btn.danger:hover {
    background: rgba(220, 53, 69, 0.6);
    border-color: rgba(220, 53, 69, 0.8);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.5);
}

/* Profile Input Fields */
.profile-input, .profile-select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    width: 100%;
}

.profile-input:focus, .profile-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.profile-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.profile-select option {
    background: rgba(0, 0, 0, 0.95);
    color: white;
}

/* Collapsible Sections */
.collapsible-section {
    margin-bottom: 0.75rem;
}

.collapsible-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.collapsible-header:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

.collapsible-header i:first-child {
    font-size: 0.9rem;
    color: #4a90e2;
    width: 18px;
    text-align: center;
}

.collapsible-header span {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}

.collapsible-header .collapse-icon {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
    width: auto;
}

.collapsible-header.active .collapse-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 0.25rem;
}

.collapsible-content.active {
    max-height: 500px;
    padding: 0.5rem 0.25rem 0;
}

/* Compact Setting Items */
.setting-item.compact {
    margin-bottom: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.setting-item.compact:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.setting-item.compact .toggle-label {
    font-size: 0.85rem;
}

.setting-item.compact:last-child {
    margin-bottom: 0;
}

/* Profile Display */
.profile-display {
    padding: 0 1.5rem 1.5rem;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-upload-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    display: block;
}

.avatar-change-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #4a90e2;
    border: 2px solid rgba(0, 0, 0, 0.8);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.avatar-change-btn:hover {
    background: #357abd;
    transform: scale(1.1);
}

.avatar-change-btn i {
    pointer-events: none;
}

.edit-profile-btn {
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(74, 144, 226, 0.3);
    color: #4a90e2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    padding: 0;
}

.edit-profile-btn:hover {
    background: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.5);
    transform: scale(1.1);
}

.edit-profile-btn i {
    pointer-events: none;
}

.cancel-edit-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-edit-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.profile-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.profile-info h4 {
    color: white;
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.profile-info p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0.25rem 0;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Profile Settings */
.profile-settings {
    padding: 1.75rem 1.75rem 1rem;
    margin-bottom: 0;
}

.profile-settings h5 {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.01em;
}

.profile-settings h5 i {
    font-size: 0.9rem;
    opacity: 1;
    color: #4a90e2;
    filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.3));
}

/* Links Manager Styles */
.links-manager {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.link-edit-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.link-edit-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.link-edit-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.link-edit-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: move;
}

.link-drag-handle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    cursor: grab;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.link-drag-handle:hover {
    color: rgba(255, 255, 255, 0.8);
}

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

.link-edit-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.link-edit-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.link-edit-name {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-edit-url {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-edit-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.link-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.link-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.link-action-btn.edit-btn:hover {
    background: rgba(74, 144, 226, 0.3);
    color: #4a90e2;
}

.link-action-btn.delete-btn:hover {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.link-edit-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.link-edit-form.active {
    display: flex;
}

.link-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.link-form-group label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    font-weight: 500;
}

.link-form-group input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.link-form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

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

.link-form-actions {
    display: flex;
    gap: 0.625rem;
    justify-content: flex-end;
}

.link-form-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.link-form-btn.save {
    background: var(--primary-color-80);
    color: white;
}

.link-form-btn.save:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

.link-form-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.link-form-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.setting-item {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.setting-item label {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    margin-bottom: 0.625rem;
    font-weight: 500;
}

.toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    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: rgba(255, 255, 255, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 26px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-slider:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 12px rgba(74, 144, 226, 0.3);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.sync-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sync-status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.sync-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.sync-info-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0;
}

.info-row i {
    color: #4a90e2;
    font-size: 0.9rem;
    width: 28px;
    text-align: center;
}

.info-row span:nth-child(2) {
    font-weight: 500;
}

.info-row .info-value {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 0.875rem;
    text-align: right;
}

.profile-btn.full-width {
    width: 100%;
    margin-top: 1rem;
}

.storage-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
}

.storage-info i {
    width: 14px;
    margin-right: 0.5rem;
}

/* Profile Actions */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1.5rem 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.profile-actions .button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.profile-actions .profile-btn {
    font-size: 0.9rem;
    padding: 0.875rem 1rem;
    width: 100%;
    white-space: nowrap;
}

.profile-actions .profile-btn i {
    font-size: 1rem;
    margin-right: 0.5rem;
}

.profile-actions > .profile-btn {
    width: 100%;
}

/* Auth Message */
.auth-message {
    margin: 1rem 1.5rem;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

.auth-message.success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.4);
    color: #90ee90;
}

.auth-message.error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ffb3b3;
}

.auth-message.info {
    background: rgba(23, 162, 184, 0.2);
    border: 1px solid rgba(23, 162, 184, 0.4);
    color: #87ceeb;
}

/* Edit panel footer styling */
.edit-panel-footer {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    text-align: center;
}

/* Add Link Button */
.add-link-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 1rem 2rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.add-link-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Editable Elements */
.editable {
    outline: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.5rem;
}

.editing .editable:hover {
    background: rgba(255, 255, 255, 0.1);
    cursor: text;
}

.editing .editable:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.editable:empty:before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Save Notification */
.save-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #4caf50;
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.save-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .time-section {
        top: 2rem;
    }
    
    .time {
        font-size: 3.2rem;
    }
    
    .date {
        font-size: 1.2rem;
    }
    
    .greeting {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: visible;
    }
    
    .search-container {
        padding: 1rem;
    }
    
    .search-section {
        max-width: 100%;
    }
    
    .search-engine-tabs {
        gap: 0.4rem;
    }
    
    .search-tab {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
        flex: 1;
    }
    
    .top-controls {
        top: 1rem;
        right: 1rem;
    }
    
    .theme-selector {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Mobile grid adjustments */
    .links-grid.row-1 .link-item {
        min-height: 90px;
    }
    
    .links-grid.row-2 .link-item {
        min-height: 75px;
    }
    
    .links-grid.row-3 .link-item {
        min-height: 65px;
    }
    
    .links-grid.row-3 .link-icon {
        font-size: 1.5rem !important;
    }
    
    .weather-widget {
        bottom: 1rem;
        left: 1rem;
        padding: 1rem;
        min-width: 120px;
    }
    
    .search-tab span {
        font-size: 0.75rem;
    }
    
    .links-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .link-card {
        padding: 1.5rem 1rem;
        min-height: 110px;
    }
    

    
    .weather-widget {
        position: static;
        margin-top: 2rem;
        align-self: flex-end;
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .time-section {
        top: 1.5rem;
    }
    
    .time {
        font-size: 2.6rem;
    }
    
    .date {
        font-size: 1.1rem;
    }
    
    .greeting {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: visible;
    }
    
    .search-container {
        padding: 0.75rem;
    }
    
    .search-engine-tabs {
        gap: 0.25rem;
        justify-content: space-between;
    }
    
    .search-tab {
        padding: 0.4rem 0.3rem;
        flex: 1;
        font-size: 0.75rem;
    }
    
    .search-tab i {
        font-size: 0.8rem;
    }
    
    .search-tab span {
        font-size: 0.65rem;
    }
    
    .links-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .link-card {
        padding: 0.5rem 0.25rem;
        min-height: inherit;
    }

    /* Extra small mobile grid adjustments */
    .links-grid.row-1 .link-item {
        min-height: 70px;
    }
    
    .links-grid.row-1 .link-icon {
        font-size: 1.8rem !important;
    }
    
    .links-grid.row-2 .link-item {
        min-height: 60px;
    }
    
    .links-grid.row-2 .link-icon {
        font-size: 1.5rem !important;
    }
    
    .links-grid.row-3 .link-item {
        min-height: 50px;
    }
    
    .links-grid.row-3 .link-icon {
        font-size: 1.25rem !important;
    }
    
    .links-grid.row-3 .link-card .link-text {
        font-size: 0.7rem !important;
    }
    
    .link-icon {
        font-size: 1.3rem;
    }
    
    .link-name {
        font-size: 0.7rem;
    }
    
    .weather-widget {
        bottom: 0.5rem;
        left: 0.5rem;
        padding: 0.75rem;
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    .reminder-widget {
        bottom: 0.5rem;
        right: 0.5rem;
        padding: 0.75rem;
        min-width: 120px;
    }
    
    .reminder-widget h3 {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .reminder-item {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
        padding: 0.25rem;
    }
    
    .add-reminder {
        padding: 0.25rem 0.5rem;
        font-size: 0.6rem;
    }
    
    .top-controls {
        top: 0.5rem;
        right: 0.5rem;
        gap: 0.5rem;
    }
    
    .profile-btn {
        width: 40px;
        height: 40px;
        padding: 0.625rem;
    }
    
    .profile-panel {
        width: 90%;
        max-width: 380px;
    }
}

/* ========================================
   WEATHER VISUAL EFFECTS (Apple Weather Style)
   ======================================== */

/* Weather effects container */
.weather-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Rain Effect */
.rain {
    position: absolute;
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, rgba(174, 194, 224, 0.1), rgba(174, 194, 224, 0.6));
    animation: fall linear infinite;
    opacity: 0.7;
    box-shadow: 0 0 2px rgba(174, 194, 224, 0.3);
}

@keyframes fall {
    0% {
        transform: translateY(-100px);
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Heavy Rain Effect */
.heavy-rain {
    width: 3px;
    height: 80px;
    background: linear-gradient(to bottom, rgba(174, 194, 224, 0.3), rgba(174, 194, 224, 0.8));
    opacity: 0.9;
    box-shadow: 0 0 3px rgba(174, 194, 224, 0.5);
}

/* Snow Effect */
.snow {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffffff 0%, #f0f8ff 50%, #e6f2ff 100%);
    border-radius: 50%;
    animation: snowfall linear infinite;
    opacity: 0.9;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 4px rgba(180, 220, 255, 0.6);
}

@keyframes snowfall {
    0% {
        transform: translateY(-10px) translateX(0) rotate(0deg);
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(50px) rotate(360deg);
        opacity: 0.2;
    }
}

/* Fog/Mist Effect */
.fog {
    position: absolute;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, 
        rgba(220, 220, 230, 0) 0%,
        rgba(200, 200, 215, 0.3) 50%,
        rgba(220, 220, 230, 0) 100%
    );
    animation: fogMove 20s ease-in-out infinite;
    opacity: 0.6;
    filter: blur(8px);
}

@keyframes fogMove {
    0%, 100% {
        transform: translateX(-20%) translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateX(20%) translateY(10px);
        opacity: 0.4;
    }
}

/* Lightning Flash Effect */
.lightning-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, 
        rgba(255, 255, 255, 0.9) 0%,
        rgba(200, 220, 255, 0.6) 30%,
        rgba(150, 180, 255, 0.3) 60%,
        transparent 100%
    );
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
}

.lightning-flash.flash {
    animation: lightning 0.3s ease-in-out;
}

@keyframes lightning {
    0% { opacity: 0; }
    10% { opacity: 1; }
    20% { opacity: 0; }
    30% { opacity: 0.8; }
    40% { opacity: 0; }
    100% { opacity: 0; }
}

/* Clouds Effect */
.cloud {
    will-change: transform, opacity;
    transform: translateZ(0); /* Force GPU acceleration */
}

@keyframes animateCloud {
    0% {
        margin-left: -1000px;
    }
    100% {
        margin-left: 100%;
    }
}

/* Heavy cloud animations for stormy weather */
.heavy-clouds {
    opacity: 0.4;
    pointer-events: none;
    position: absolute;
    overflow: hidden;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-repeat: repeat-x;
    will-change: background-position;
    transform: translateZ(0); /* Force GPU acceleration */
}

@keyframes heavy-clouds-loop-1 {
    to { background-position: -1000px 0; }
}

@keyframes heavy-clouds-loop-2 {
    to { background-position: -1000px 0; }
}

@keyframes heavy-clouds-loop-3 {
    to { background-position: -1579px 0; }
}

.heavy-clouds-1 {
    background-image: url('https://s.cdpn.io/15514/clouds_2.png');
    animation: heavy-clouds-loop-1 20s infinite linear;
    height: 500px;
}

.heavy-clouds-2 {
    background-image: url('https://s.cdpn.io/15514/clouds_1.png');
    animation: heavy-clouds-loop-2 15s infinite linear;
    height: 500px;
}

.heavy-clouds-3 {
    background-image: url('https://s.cdpn.io/15514/clouds_3.png');
    animation: heavy-clouds-loop-3 17s infinite linear;
    height: 500px;
}

/* Apply dark filters to heavy clouds based on weather */
.heavy-clouds.rain-cloud {
    filter: brightness(0.3) contrast(1.2);
}

.heavy-clouds.full-cloud {
    filter: brightness(0.4) contrast(1.1);
}

.x1, .x2, .x3, .x4, .x5 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
}

.x1 {
    animation: animateCloud 90s linear infinite;
    transform: scale(0.65);
}

.x2 {
    animation: animateCloud 65s linear infinite;
    transform: scale(0.3);
}

.x3 {
    animation: animateCloud 75s linear infinite;
    transform: scale(0.5);
}

.x4 {
    animation: animateCloud 60s linear infinite;
    transform: scale(0.4);
}

.x5 {
    animation: animateCloud 70s linear infinite;
    transform: scale(0.55);
}

.cloud {
    background: #fff;
    background: linear-gradient(to bottom, #fff 5%, #f1f1f1 100%);
    border-radius: 100px;
    box-shadow: 0 8px 5px rgba(0, 0, 0, 0.1);
    height: 120px;
    position: relative;
    width: 350px;
    opacity: 0.8;
    pointer-events: none;
}

.cloud:after, .cloud:before {
    background: #fff;
    content: '';
    position: absolute;
    z-index: -1;
}

.cloud:after {
    border-radius: 100px;
    height: 100px;
    left: 50px;
    top: -50px;
    width: 100px;
}

.cloud:before {
    border-radius: 200px;
    width: 180px;
    height: 180px;
    right: 50px;
    top: -90px;
}

/* Cloud color variations based on weather */
.rain-cloud .cloud {
    background: #4a5258;
    background: linear-gradient(to bottom, #4a5258 5%, #3a4248 100%);
}

.rain-cloud .cloud:after,
.rain-cloud .cloud:before {
    background: #3a4248;
}

.full-cloud .cloud {
    background: #5a626a;
    background: linear-gradient(to bottom, #5a626a 5%, #4a525a 100%);
}

.full-cloud .cloud:after,
.full-cloud .cloud:before {
    background: #4a525a;
}

.partly-cloud .cloud {
    background: #9ba3ab;
    background: linear-gradient(to bottom, #9ba3ab 5%, #8b939b 100%);
}

.partly-cloud .cloud:after,
.partly-cloud .cloud:before {
    background: #8b939b;
}

/* Stars Effect (for clear nights) */
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: radial-gradient(circle, #ffffff 0%, #ffffcc 50%, transparent 100%);
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8), 0 0 2px rgba(255, 255, 200, 0.6);
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.3);
    }
}

/* Sun Rays Effect */
.sun-rays {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 200px;
    height: 200px;
    animation: rotate 30s linear infinite;
    opacity: 0.2;
}

.sun-ray {
    position: absolute;
    width: 4px;
    height: 100px;
    background: linear-gradient(to bottom, 
        rgba(255, 250, 200, 0.8), 
        rgba(255, 230, 150, 0.4),
        transparent
    );
    top: 50%;
    left: 50%;
    transform-origin: top center;
    filter: blur(1px);
    box-shadow: 0 0 10px rgba(255, 250, 200, 0.3);
}

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

/* Wind particles effect */
.wind-particle {
    position: absolute;
    width: 20px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    animation: windBlow linear infinite;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
}

@keyframes windBlow {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateX(120vw) translateY(-100px) rotate(45deg);
        opacity: 0;
    }
}

/* Haze overlay effect */
.haze-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, 
        rgba(200, 190, 150, 0.15) 0%,
        rgba(180, 170, 140, 0.1) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
    animation: hazeShimmer 8s ease-in-out infinite;
}

@keyframes hazeShimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}