* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(to bottom right, #0F172A, #1E293B);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #F8FAFC;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transition: background 0.5s ease;
}

.fullscreen-button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(59, 130, 246, 0.8);
    color: white;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.fullscreen-button:hover {
    background: #2563EB;
    transform: scale(1.1);
}

/* Bottom Bar Styles */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.9); /* Slightly darker for contrast */
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    z-index: 1000;
    flex-wrap: wrap;
    gap: 1.5rem; /* Increased gap */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3); /* Added shadow */
}

.style-controls {
    display: flex;
    gap: 0.75rem; /* Increased gap */
    flex-wrap: wrap;
    justify-content: center;
}

.action-buttons {
    display: flex;
    gap: 1rem; /* Increased gap */
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.style-button {
    background: rgba(59, 130, 246, 0.8);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-button:hover, .style-button.active {
    background: #2563EB;
}

/* Redefine container-wrapper for smooth transition */
.container-wrapper {
    width: 100%;
    max-width: 1200px;
    margin-left: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    padding: 2rem;
    margin: 0 auto;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

.status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.status-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-text {
    font-weight: 500;
}

.date-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.date-display, .weekday-display {
    font-weight: 300;
    letter-spacing: 0.15em;
    font-size: 2.5rem;
}

.date-separator {
    width: 1px;
    height: 3rem;
    background: rgba(59, 130, 246, 0.3);
    margin: 0 1.5rem;
    display: none;
}

@media (min-width: 768px) {
    .date-separator {
        display: block;
    }
}

.time-container {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.time-display {
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 6rem;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.6), 
                 0 0 30px rgba(59, 130, 246, 0.4), 
                 0 0 45px rgba(59, 130, 246, 0.2);
    transition: all 0.5s ease;
}

.time-separator {
    margin: 0 0.5rem;
}

@media (min-width: 768px) {
    .time-display {
        font-size: 8rem;
    }
    .time-separator {
        margin: 0 1rem;
    }
}

@media (min-width: 1024px) {
    .time-display {
        font-size: 10rem;
    }
}

.sync-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.sync-button {
    background: #3B82F6;
    color: white;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.sync-button:hover {
    background: #2563EB;
    transform: scale(1.05);
}

.sync-button:disabled {
    background: #60A5FA;
    cursor: not-allowed;
    transform: none;
}

.sync-button i {
    margin-right: 0.5rem;
}

.timezone-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    color: #93C5FD;
    font-weight: 300;
    font-size: 1.25rem;
}

.timezone-container i {
    margin-right: 0.5rem;
}

@media (min-width: 768px) {
    .timezone-container {
        font-size: 1.5rem;
    }
}

.sync-info {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #94A3B8;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in-out;
    display: none; /* 默认隐藏 */
}

.modal-content {
    background: #0F172A;
    border: 2px solid #3B82F6;
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 90%;
    width: 400px;
    animation: scaleIn 0.3s ease-in-out;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-icon {
    color: #3B82F6;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3B82F6;
}

.modal-body {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.authorized-to {
    text-align: center;
    margin: 1rem 0;
    font-weight: 700;
    color: #10B981;
    font-size: 1.25rem;
}

.class-name {
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    margin: 1rem 0;
}

.producer {
    text-align: center;
    margin: 1.5rem 0;
    font-weight: 500;
    color: #FBBF24;
    font-size: 1.25rem;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 1rem; /* 按钮间距 */
}

.close-modal {
    background: #3B82F6;
    color: white;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #2563EB;
}

.modal-notice {
    font-size: 0.875rem;
    color: #94A3B8;
    text-align: center;
    margin-top: 1rem;
}

.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    transform: translateX(120%);
    opacity: 0;
}

.notification i {
    margin-right: 0.5rem;
}

.notification-success {
    background: #10B981;
}

.notification-error {
    background: #EF4444;
}

.notification-info {
    background: #3B82F6;
}

@keyframes flip {
    0% { transform: rotateX(0deg); opacity: 1; }
    50% { transform: rotateX(90deg); opacity: 0.5; }
    100% { transform: rotateX(0deg); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.8; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.time-transition {
    transition: all 0.3s ease-in-out;
}

.time-flip {
    animation: flip 0.6s ease-in-out;
}

.time-slide-up {
    animation: slideUp 0.5s ease-out;
}

.time-slide-down {
    animation: slideDown 0.5s ease-out;
}

/* Style 1: Digital Neon (Upgraded) */
.time-style-1 body {
    background-color: #050505;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    color: #e0f2fe;
}

.time-style-1 .time-display {
    font-family: 'Courier New', Courier, monospace; /* Fallback to system mono, ideally use a web font */
    color: #00f3ff;
    text-shadow: 
        0 0 5px rgba(0, 243, 255, 0.8),
        0 0 10px rgba(0, 243, 255, 0.6),
        0 0 20px rgba(0, 243, 255, 0.4),
        0 0 40px rgba(0, 100, 255, 0.3);
    letter-spacing: 0.05em;
    animation: neon-pulse 3s infinite alternate;
}

.time-style-1 .date-display, 
.time-style-1 .weekday-display {
    color: #38bdf8;
    text-shadow: 0 0 5px rgba(56, 189, 248, 0.5);
    font-family: 'Courier New', Courier, monospace;
}

.time-style-1 .status-indicator {
    background-color: #00f3ff !important;
    box-shadow: 0 0 8px #00f3ff;
}

.time-style-1 .status-text {
    color: #7dd3fc !important;
}

@keyframes neon-pulse {
    0% { text-shadow: 0 0 5px rgba(0, 243, 255, 0.8), 0 0 10px rgba(0, 243, 255, 0.6), 0 0 20px rgba(0, 243, 255, 0.4); }
    100% { text-shadow: 0 0 7px rgba(0, 243, 255, 0.9), 0 0 15px rgba(0, 243, 255, 0.7), 0 0 25px rgba(0, 243, 255, 0.5), 0 0 50px rgba(0, 100, 255, 0.4); }
}

/* Style 2: Sci-Fi Hologram (Upgraded) */
.time-style-2 body {
    background: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 100%);
    color: #c4b5fd;
    overflow: hidden;
}

.time-style-2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
}

.time-style-2::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: hologram-shift 10s infinite linear;
}

.time-style-2 .time-display {
    font-family: sans-serif; /* Clean, modern font */
    font-weight: 800;
    color: rgba(165, 180, 252, 0.9);
    text-shadow: 
        2px 0 0 rgba(255, 0, 0, 0.3),
        -2px 0 0 rgba(0, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.time-style-2 .time-display::after {
    content: attr(data-time); /* Requires JS to update data-time attribute for full effect, or just decorative */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    filter: blur(5px);
    z-index: -1;
}

.time-style-2 .date-display,
.time-style-2 .weekday-display {
    color: #a5b4fc;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(165, 180, 252, 0.3);
    padding-bottom: 0.5rem;
}

.time-style-2 .status-indicator {
    background-color: #818cf8 !important;
    box-shadow: 0 0 10px #818cf8;
}

.time-style-2 .status-text {
    color: #c7d2fe !important;
}

@keyframes hologram-shift {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 0.6; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* 半块模式按钮样式（与原有按钮风格一致） */
.half-mode-button {
    /* Position handled by bottom-bar flex layout */
    background: rgba(59, 130, 246, 0.8);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.half-mode-button:hover {
    background: #2563EB;
}

/* 设置按钮样式 */
.settings-button {
    /* Position handled by bottom-bar flex layout */
    background: rgba(59, 130, 246, 0.8);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.settings-button:hover {
    background: #2563EB;
}

/* 半块模式修复：确保内容完全在屏幕内 */
.half-mode .container-wrapper {
    width: 50%;
    margin-left: 50%;
    background: rgba(0, 0, 0, 0.2); /* Optional: slight dim to separate */
    backdrop-filter: blur(10px); /* Modern touch */
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.half-mode .container {
    transform: scale(var(--scale, 0.7));
}

/* 设置弹窗样式 */
.settings-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-label {
    font-size: 1rem;
    color: #93C5FD;
}

.scale-slider {
    width: 100%;
    height: 0.5rem;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 0.25rem;
    outline: none;
    -webkit-appearance: none;
}

.scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #3B82F6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scale-slider::-webkit-slider-thumb:hover {
    background: #2563EB;
    transform: scale(1.1);
}

.scale-value {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #3B82F6;
}

.reset-button {
    background: rgba(239, 68, 68, 0.8);
    color: white;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-button:hover {
    background: #EF4444;
}

/* 响应式调整：小屏幕下半块模式优化 */
@media (max-width: 768px) {
    .half-mode .container-wrapper {
        width: 100%;
        margin-left: 0;
    }
    .half-mode .container {
        transform: scale(var(--scale, 0.8));
    }
    .date-display, .weekday-display {
        font-size: 2rem;
    }
    .time-display {
        font-size: 5rem !important;
    }
}

/* Style 3: Minimalist */
.time-style-3 .time-display {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 100;
    letter-spacing: -0.05em;
    text-shadow: none;
    color: #f8fafc;
}
.time-style-3 body {
    background: #000000;
}
.time-style-3 .status-indicator { background-color: #f8fafc !important; }
.time-style-3 .status-text { color: #94a3b8 !important; }

/* Style 4: Cyberpunk */
.time-style-4 .time-display {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 900;
    color: #f0f;
    text-shadow: 2px 2px 0px #0ff, -2px -2px 0px #ff00de;
    transform: skew(-5deg);
}
.time-style-4 body {
    background: linear-gradient(45deg, #0f0c29, #302b63, #24243e);
}
.time-style-4 .date-display {
    color: #0ff;
    font-family: monospace;
}

/* Style 5: Retro Terminal */
.time-style-5 .time-display {
    font-family: 'Consolas', 'Monaco', monospace;
    color: #33ff33;
    text-shadow: 0 0 10px #33ff33;
}
.time-style-5 body {
    background-color: #0d0d0d;
    background-image: radial-gradient(rgba(0, 150, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}
.time-style-5 .date-display, .time-style-5 .status-text {
    color: #33ff33 !important;
    font-family: monospace;
}
.time-style-5 .status-indicator {
    background-color: #33ff33 !important;
    box-shadow: 0 0 5px #33ff33;
}

/* Tools Modal Styles */
.tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}
.tab-btn.active {
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
}
.tab-btn:hover {
    color: white;
}
.shortcut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    padding: 1rem;
    border-radius: 0.5rem;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}
.shortcut-item:hover {
    background: #334155;
    transform: translateY(-2px);
}
.shortcut-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Light Mode */
body.light-mode {
    background: #f8fafc;
    color: #1e293b;
}

body.light-mode .time-display {
    color: #0f172a;
    text-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body.light-mode .date-display, 
body.light-mode .weekday-display,
body.light-mode .timezone-container {
    color: #475569;
}

body.light-mode .status-text {
    color: #059669 !important; /* Green 600 */
}

body.light-mode .shortcut-item {
    background: white;
    color: #1e293b;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body.light-mode .shortcut-item:hover {
    background: #f1f5f9;
}

body.light-mode .modal-content {
    background: white;
    color: #1e293b;
    border-color: #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body.light-mode .class-name {
    color: #1e293b;
}

body.light-mode .tab-btn {
    color: #64748b;
}

body.light-mode .tab-btn.active {
    color: #3b82f6;
}

body.light-mode .tab-btn:hover {
    color: #0f172a;
}
