/* Navigation Portal - New Design */
/* Background focused, transparent elements */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --text: #ffffff;
    --text-dark: #1f2937;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-dark: rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --radius: 16px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
}

body.has-bg {
    background: #1a1a2e;
}

/* Background Image */
.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.4) 100%);
    z-index: -1;
}

/* Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    color: var(--primary);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.weather-widget:hover {
    background: var(--glass-dark);
}

.weather-widget i {
    font-size: 18px;
    color: #fbbf24;
}

#weatherCity {
    cursor: pointer;
}

#weatherCity i {
    font-size: 12px;
    margin-left: 4px;
    color: inherit;
}

.user-actions {
    display: flex;
    gap: 12px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--glass-dark);
    transform: scale(1.05);
}

.icon-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-dropdown {
    position: fixed;
    top: 70px;
    right: 24px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 200;
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
}

/* Main Container */
.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 24px 40px;
    min-height: 100vh;
}

/* Time Section */
.time-section {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 40px;
}

.time-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}

.time-display .time {
    font-size: 96px;
    font-weight: 200;
    letter-spacing: -4px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 40px rgba(0,0,0,0.3);
}

.time-display .seconds {
    font-size: 32px;
    font-weight: 300;
    opacity: 0.7;
}

.date-display {
    font-size: 20px;
    opacity: 0.9;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.date-display span {
    margin: 0 8px;
}

/* Search Section */
.search-section {
    margin-bottom: 40px;
}

.search-box {
    max-width: 640px;
    margin: 0 auto;
    border-radius: 30px;
    padding: 8px;
    box-shadow: var(--shadow);
}

.search-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
}

.search-tab {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    color: rgba(255,255,255,0.7);
}

.search-tab:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.search-tab.active {
    color: white;
    background: var(--primary);
}

.search-input-wrap {
    display: flex;
    gap: 12px;
    padding: 8px 16px 16px;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255,255,255,0.9);
    font-size: 16px;
    outline: none;
    color: var(--text-dark);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Category Section */
.category-section {
    margin-bottom: 40px;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    font-weight: 500;
}

.category-tab:hover {
    background: var(--glass-dark);
    transform: translateY(-2px);
}

.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Icon Grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 20px;
    justify-items: center;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    cursor: pointer;
    padding: 12px;
    border-radius: var(--radius);
}

.icon-item:hover {
    transform: translateY(-4px);
    background: var(--glass-bg);
}

.icon-item img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: white;
    padding: 8px;
}

/* Icon Styles */
.icon-item.icon-circle img {
    border-radius: 50%;
}

.icon-item.icon-square img {
    border-radius: 8px;
}

.icon-item span {
    font-size: 12px;
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.4);
    font-weight: 500;
}

/* Hot Section */
.hot-section, .local-news-section {
    max-width: 640px;
    margin: 0 auto;
}

.hot-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.hot-tab {
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    color: rgba(255,255,255,0.7);
    border-bottom: 2px solid transparent;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.hot-tab:hover {
    color: white;
}

.hot-tab.active {
    color: white;
    border-color: var(--primary);
}

.hot-list {
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
}

.hot-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.hot-item:hover {
    background: rgba(255,255,255,0.1);
}

.hot-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    background: rgba(255,255,255,0.2);
}

.hot-item:nth-child(1) .hot-rank { background: #ef4444; }
.hot-item:nth-child(2) .hot-rank { background: #f97316; }
.hot-item:nth-child(3) .hot-rank { background: #eab308; }

.hot-title {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Local News Items */
.news-item {
    gap: 8px;
}

.news-class-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-date {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

.dark .news-class-tag {
    background: rgba(59, 130, 246, 0.3);
    color: #93bbfc;
}

.loading {
    text-align: center;
    padding: 40px;
    color: rgba(255,255,255,0.7);
}

/* Announcement Marquee */
.announce-bar {
    display: flex;
    align-items: center;
    max-width: 640px;
    margin: 16px auto 0;
    padding: 8px 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    overflow: hidden;
    gap: 8px;
}

.announce-label {
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
    flex-shrink: 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.announce-label i {
    margin-right: 4px;
}

.announce-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 22px;
}

.announce-content {
    display: flex;
    white-space: nowrap;
    animation: marqueeScroll 20s linear infinite;
    position: absolute;
    top: 0;
    left: 0;
}

.announce-content:hover {
    animation-play-state: paused;
}

.announce-item {
    display: inline-block;
    padding: 0 24px;
    font-size: 13px;
    cursor: pointer;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    line-height: 22px;
    transition: color 0.2s;
}

.announce-item:hover {
    color: #fbbf24;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Announcement Modal */
.announce-detail-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.announce-detail-time {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.announce-detail-body {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-dark);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Site Footer */
.site-footer {
    text-align: center;
    padding: 30px 20px 20px;
    margin-top: 20px;
}

.footer-content {
    max-width: 640px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.footer-links a:hover {
    color: rgba(255,255,255,0.9);
}

.footer-divider {
    color: rgba(255,255,255,0.3);
    margin: 0 10px;
    font-size: 12px;
}

.footer-info p {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 4px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.footer-info a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
}

.footer-info a:hover {
    color: rgba(255,255,255,0.7);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: var(--radius);
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 70px);
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: var(--primary-dark);
}

/* City Selector Modal */
.city-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.city-item {
    padding: 10px;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    background: #f3f4f6;
}

.city-item:hover {
    background: var(--primary);
    color: white;
}

/* Background Selector */
.bg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bg-item {
    aspect-ratio: 16/9;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.bg-item:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

/* Upload button style */
.bg-item.bg-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border: 2px dashed #94a3b8;
    color: #475569;
}

.bg-item.bg-upload:hover {
    background: #e2e8f0;
    border-color: var(--primary);
    color: var(--primary);
}

.bg-item.bg-upload i {
    font-size: 28px;
    margin-bottom: 8px;
}

.bg-item.bg-upload span {
    font-size: 13px;
    font-weight: 500;
    text-shadow: none;
}

/* User background with delete */
.bg-item.user-bg {
    position: relative;
}

.bg-item .bg-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}

.bg-item .bg-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.bg-item:hover .bg-delete {
    opacity: 1;
}

.bg-item .bg-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

body.dark .bg-item.bg-upload {
    background: #374151;
    border-color: #6b7280;
    color: #d1d5db;
}

.bg-item.active {
    border-color: var(--primary);
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    z-index: 400;
    display: none;
}

.toast.show {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar {
        padding: 12px 16px;
    }
    
    .logo-text {
        display: none;
    }
    
    .time-display .time {
        font-size: 64px;
    }
    
    .time-display .seconds {
        font-size: 24px;
    }
    
    .date-display {
        font-size: 16px;
    }
    
    .search-box {
        margin: 0 16px;
    }
    
    .category-tabs {
        padding: 0 16px;
    }
    
    .icon-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
        padding: 0 16px;
    }
    
    .icon-item img {
        width: 44px;
        height: 44px;
    }
    
    .hot-section {
        padding: 0 16px;
    }
    .local-news-section {
        padding: 0 16px;
    }
}

/* Dark Mode */
body.dark {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --text: #f3f4f6;
    --text-dark: #f3f4f6;
    --glass-bg: rgba(30, 30, 40, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(0, 0, 0, 0.5);
}

body.dark .bg-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.6) 100%);
}

body.dark .modal-box {
    background: #1f2937;
    color: #f3f4f6;
}

body.dark .modal-header {
    border-color: #374151;
}

body.dark .form-group input,
body.dark .form-group select {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

body.dark .dropdown-item {
    color: #f3f4f6;
}

body.dark .dropdown-item:hover {
    background: rgba(59, 130, 246, 0.2);
}

body.dark .user-dropdown {
    background: rgba(31, 41, 55, 0.95);
}

body.dark .search-input {
    background: rgba(55, 65, 81, 0.9);
    color: #f3f4f6;
}

body.dark .search-input::placeholder {
    color: #9ca3af;
}

/* Settings Styles */
.modal-large {
    max-width: 560px;
}

.settings-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

body.dark .settings-section {
    border-color: #374151;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
}

body.dark .settings-section h4 {
    color: #f3f4f6;
}

.settings-section h4 i {
    color: var(--primary);
}

/* Toggle Switch */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f3f4f6;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

body.dark .toggle-item {
    background: #374151;
}

.toggle-item span:first-child {
    font-size: 14px;
}

.toggle-item input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-item input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-item input:checked + .toggle-slider::after {
    left: 22px;
}

/* Theme Options */
.theme-options {
    display: flex;
    gap: 8px;
}

.theme-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-dark);
}

body.dark .theme-btn {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.theme-btn:hover {
    border-color: var(--primary);
}

.theme-btn.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

/* Color Options */
.color-options {
    display: flex;
    gap: 12px;
}

.color-item {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
}

.color-item:hover {
    transform: scale(1.1);
}

.color-item.active {
    border-color: white;
    box-shadow: 0 0 0 2px var(--primary);
}

/* Range Input */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

body.dark input[type="range"] {
    background: #4b5563;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Form Label in dark mode */
body.dark .form-group label {
    color: #d1d5db;
}

/* Icon Delete Button */
.icon-item {
    position: relative;
}

.icon-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-item:hover .icon-delete {
    opacity: 1;
}

.user-link {
    border: 2px solid var(--primary);
    border-radius: var(--radius);
}

/* Notes Styles */
.notes-toolbar {
    margin-bottom: 16px;
}

.notes-list {
    max-height: 400px;
    overflow-y: auto;
}

.note-item {
    padding: 16px;
    background: #f3f4f6;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

body.dark .note-item {
    background: #374151;
}

.note-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.note-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.note-preview {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.note-time {
    font-size: 12px;
    color: #9ca3af;
}

.note-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.note-item:hover .note-delete {
    opacity: 1;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

body.dark textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

/* Calendar Styles */
.calendar-widget {
    margin-bottom: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-header button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark .calendar-header button {
    background: #374151;
    color: #f3f4f6;
}

.calendar-header button:hover {
    background: var(--primary);
    color: white;
}

.calendar-header span {
    font-weight: 600;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #9ca3af;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-days span {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-days span:not(.empty):hover {
    background: #f3f4f6;
}

body.dark .calendar-days span:not(.empty):hover {
    background: #374151;
}

.calendar-days span.today {
    background: var(--primary);
    color: white;
}

.calendar-days span.selected {
    border: 2px solid var(--primary);
}

.calendar-days span.has-todo {
    position: relative;
}

.calendar-days span.has-todo::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.calendar-days span.has-undone::after {
    background: #ef4444;
}

.calendar-days span.empty {
    cursor: default;
}

/* Todo Styles */
.todo-section h4 {
    margin-bottom: 12px;
    font-size: 14px;
}

.todo-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f3f4f6;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

body.dark .todo-item {
    background: #374151;
}

.todo-item.done span {
    text-decoration: line-through;
    opacity: 0.6;
}

.todo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.todo-item span {
    flex: 1;
    font-size: 14px;
}

.todo-item button {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.todo-item:hover button {
    opacity: 1;
}

.todo-add {
    display: flex;
    gap: 8px;
}

.todo-add input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

body.dark .todo-add input {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.todo-add button {
    width: 40px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
}

/* Notification Styles */
.notify-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notify-section-title i {
    color: var(--primary);
}

body.dark .notify-section-title {
    color: #9ca3af;
    border-color: #374151;
}

.notify-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: var(--radius-sm);
    padding: 10px 8px;
}

.notify-item:hover {
    background: #f9fafb;
}

body.dark .notify-item {
    border-color: #374151;
}

body.dark .notify-item:hover {
    background: #374151;
}

.notify-item.unread {
    background: rgba(59, 130, 246, 0.05);
}

.notify-item.read {
    opacity: 0.6;
}

.notify-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.notify-todo .notify-icon {
    background: #fef3c7;
    color: #d97706;
}

.notify-msg .notify-icon {
    background: #dbeafe;
    color: #2563eb;
}

.notify-content {
    flex: 1;
    min-width: 0;
}

.notify-text {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.notify-preview {
    font-size: 12px;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notify-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

/* ===== Music Box Player ===== */
.music-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 300;
    transition: all 0.3s;
    color: var(--text);
    font-size: 20px;
}

.music-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

.music-fab.playing {
    animation: musicPulse 2s ease-in-out infinite;
    color: var(--primary);
}

@keyframes musicPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(59,130,246,0.3); }
    50% { box-shadow: 0 4px 24px rgba(59,130,246,0.6); }
}

.music-fab .fa-spin-custom {
    animation: musicSpin 3s linear infinite;
}

@keyframes musicSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.music-player {
    position: fixed;
    bottom: 82px;
    right: 24px;
    width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 300;
    overflow: hidden;
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
}

.music-player.show {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

.music-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
}

.music-player-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.music-player-header h4 i {
    color: var(--primary);
}

.music-player-close {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.music-player-close:hover { opacity: 1; }

.music-now-playing {
    padding: 0 16px 12px;
    text-align: center;
}

.music-disc {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.music-disc::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid rgba(255,255,255,0.3);
}

.music-disc i {
    position: absolute;
    font-size: 20px;
    color: rgba(255,255,255,0.8);
}

.music-disc.spinning {
    animation: musicSpin 4s linear infinite;
}

.music-song-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 2px;
}

.music-song-artist {
    font-size: 12px;
    color: var(--text);
    opacity: 0.7;
}

/* Progress Bar */
.music-progress {
    padding: 0 16px;
    margin-bottom: 6px;
}

.music-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.music-progress-bar:hover {
    height: 6px;
}

.music-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.music-progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.music-progress-bar:hover .music-progress-fill::after {
    opacity: 1;
}

.music-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text);
    opacity: 0.6;
    margin-top: 4px;
}

/* Controls */
.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 16px 12px;
}

.music-ctrl-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-ctrl-btn:hover {
    background: rgba(255,255,255,0.15);
    color: var(--primary);
}

.music-ctrl-btn.play-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
    background: var(--primary);
    color: white;
}

.music-ctrl-btn.play-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
    color: white;
}

/* Volume */
.music-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 10px;
}

.music-volume-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    padding: 2px;
    opacity: 0.7;
}

.music-volume-btn:hover { opacity: 1; }

.music-volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    outline: none;
}

.music-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.music-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

/* Playlist Toggle */
.music-playlist-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: background 0.2s;
}

.music-playlist-toggle:hover {
    background: rgba(255,255,255,0.05);
}

.music-playlist-toggle span {
    font-size: 12px;
    color: var(--text);
    opacity: 0.8;
}

.music-playlist-toggle i {
    font-size: 12px;
    color: var(--text);
    opacity: 0.6;
    transition: transform 0.3s;
}

.music-playlist-toggle.expanded i {
    transform: rotate(180deg);
}

/* Playlist */
.music-playlist {
    max-height: 0;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.music-playlist.show {
    max-height: 200px;
}

.music-playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    color: var(--text-dark);
}

.music-playlist-item:hover {
    background: rgba(255,255,255,0.1);
}

.music-playlist-item.active {
    color: var(--primary);
    background: rgba(59,130,246,0.1);
}

.music-playlist-item .pl-num {
    width: 20px;
    text-align: center;
    font-size: 11px;
    opacity: 0.5;
    flex-shrink: 0;
}

.music-playlist-item.active .pl-num {
    opacity: 1;
}

.music-playlist-item .pl-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-playlist-item .pl-playing {
    color: var(--primary);
    font-size: 10px;
    flex-shrink: 0;
}

.music-empty {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text);
    opacity: 0.5;
}

.music-empty i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

/* Play mode button */
.music-mode-btn {
    font-size: 14px !important;
    opacity: 0.7;
}

.music-mode-btn:hover { opacity: 1; }

/* Dark Mode */
body.dark .music-fab {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(255,255,255,0.1);
}

body.dark .music-player {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(255,255,255,0.1);
}

body.dark .music-progress-bar {
    background: rgba(255,255,255,0.1);
}

body.dark .music-volume-slider {
    background: rgba(255,255,255,0.1);
}

body.dark .music-playlist-toggle {
    border-top-color: rgba(255,255,255,0.05);
}
