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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

body.spring-theme {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.site-name {
    font-size: 18px;
    font-weight: 600;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.username {
    font-size: 14px;
}

.btn-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.btn-link:hover {
    opacity: 1;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    gap: 40px;
}

.time-display {
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.time-hours {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.time-date {
    font-size: 18px;
    opacity: 0.95;
}

.search-section {
    width: 100%;
    max-width: 680px;
}

.search-wrapper {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-dropdown {
    position: relative;
}

.search-dropdown-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    padding: 14px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.search-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    z-index: 100;
    margin-top: 5px;
    padding: 5px 0;
}

.search-dropdown-menu.show {
    display: block;
}

.search-engine {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-engine:hover {
    background: #f5f5f5;
}

.search-engine i {
    width: 16px;
    text-align: center;
}

.search-box {
    flex: 1;
    display: flex;
    background: white;
    border-radius: 25px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.search-box input::placeholder {
    color: #999;
}

.search-btn {
    background: #667eea;
    border: none;
    color: white;
    width: 56px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #764ba2;
}

.hot-search {
    width: 100%;
    max-width: 680px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
}

.hot-search-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hot-search-title i {
    color: #ff6b6b;
}

.hot-search-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hot-search-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.hot-search-item:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hot-search-rank {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.hot-search-rank.top3 {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

.hot-search-rank.other {
    background: rgba(255, 255, 255, 0.3);
}

.loading {
    color: white;
    text-align: center;
    padding: 20px;
    width: 100%;
}

.quick-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 25px;
    justify-items: center;
    padding: 20px 0;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: transform 0.3s ease;
    cursor: move;
    position: relative;
    width: 90px;
}

.quick-link:hover {
    transform: translateY(-8px);
}

.quick-link.dragging {
    opacity: 0.5;
    transform: scale(1.05);
}

.quick-link-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quick-link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.quick-link:hover .quick-link-icon {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.quick-link-title {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    opacity: 0.95;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-link-actions {
    position: absolute;
    top: -8px;
    right: -8px;
    display: none;
    gap: 4px;
}

.quick-link:hover .quick-link-actions {
    display: flex;
}

.quick-link-actions button {
    background: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.quick-link-actions button:hover {
    background: #f44336;
    color: white;
}

.quick-link-add {
    background: rgba(255, 255, 255, 0.15);
    border: 3px dashed rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-link-add:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.quick-link-add .quick-link-icon {
    background: transparent;
    border: none;
    box-shadow: none;
}

.quick-link-add i {
    font-size: 36px;
    color: white;
}

.bottom-bar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-size: 12px;
}

.footer-link {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 1;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-size: 16px;
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notebook-list {
    list-style: none;
    margin-bottom: 15px;
}

.notebook-list li {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
}

.notebook-list li:hover {
    background: #e0e0e0;
}

.notebook-list li .note-actions {
    display: none;
    gap: 8px;
}

.notebook-list li:hover .note-actions {
    display: flex;
}

.note-actions button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.note-actions button:hover {
    opacity: 1;
}

.btn-add-note {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-add-note:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.calendar-widget {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
    color: #666;
    transition: color 0.3s ease;
}

.calendar-header button:hover {
    color: #667eea;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-name {
    text-align: center;
    font-size: 11px;
    color: #999;
    padding: 5px;
}

.calendar-day {
    text-align: center;
    padding: 8px 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background: #e0e0e0;
}

.calendar-day.today {
    background: #667eea;
    color: white;
}

.calendar-day.has-remind {
    position: relative;
}

.calendar-day.has-remind::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #f44336;
    border-radius: 50%;
}

.calendar-day.other-month {
    color: #ccc;
}

.sidebar-toggle {
    position: absolute;
    top: 15px;
    left: -50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.btn-close:hover {
    color: #f44336;
}

.modal-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary,
.btn-secondary {
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.background-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.background-preset {
    aspect-ratio: 16/9;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
}

.background-preset:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.background-preset.selected {
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    .quick-links {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .quick-link-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
    
    .quick-link-title {
        font-size: 12px;
    }
    
    .sidebar {
        width: 280px;
        right: -280px;
    }
    
    .sidebar-toggle {
        left: -40px;
    }
    
    .site-name {
        font-size: 16px;
    }
    
    .time-hours {
        font-size: 48px;
    }
    
    .time-date {
        font-size: 16px;
    }
    
    .user-actions {
        gap: 15px;
    }
    
    .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .main-container {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .quick-links {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .quick-link {
        width: 80px;
    }
    
    .quick-link-icon {
        width: 52px;
        height: 52px;
        font-size: 26px;
    }
    
    .time-hours {
        font-size: 40px;
    }
    
    .time-date {
        font-size: 14px;
    }
}
