
/* ===== tool/templates/tools/full-clock.html ===== */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            font-family: 'Arial', 'Microsoft YaHei', sans-serif;
            transition: background 0.5s ease;
            overflow: hidden;
        }

        .clock-container {
            text-align: center;
            padding: 2rem;
            position: relative;
        }

        .time-display {
            font-size: 18vw;
            font-weight: bold;
            line-height: 1.1;
            transition: color 0.3s ease, transform 0.3s ease;
            text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
        }

        .date-display {
            font-size: 4vw;
            margin-top: 1rem;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .week-display {
            font-size: 2.5vw;
            margin-top: 0.5rem;
            opacity: 0.9;
            transition: color 0.3s ease;
        }

        .controls {
            position: fixed;
            bottom: 2rem;
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            justify-content: center;
            padding: 1rem 2rem;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            backdrop-filter: blur(10px);
            transition: opacity 0.3s ease;
            z-index: 100;
        }

        .controls.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .btn {
            padding: 0.8rem 1.5rem;
            border: none;
            border-radius: 25px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            color: white;
            background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
        }

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

        .btn:active {
            transform: translateY(0);
        }

        .color-btn {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            border: 3px solid white;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }

        .color-btn:hover {
            transform: scale(1.15);
        }

        .color-btn.active {
            transform: scale(1.2);
            box-shadow: 0 0 20px currentColor;
        }

        .theme-blue { background: linear-gradient(135deg, #667eea, #764ba2); }
        .theme-red { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
        .theme-green { background: linear-gradient(135deg, #4CAF50, #8BC34A); }
        .theme-yellow { background: linear-gradient(135deg, #f9ca24, #f0932b); }
        .theme-pink { background: linear-gradient(135deg, #fd79a8, #e84393); }
        .theme-cyan { background: linear-gradient(135deg, #00cec9, #0984e3); }
        .theme-orange { background: linear-gradient(135deg, #ff9ff3, #feca57); }
        .theme-purple { background: linear-gradient(135deg, #a55eea, #8854d0); }

        .fullscreen-btn {
            background: linear-gradient(135deg, #2196F3, #21CBF3);
        }

        .toggle-controls-btn {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 1000;
            opacity: 0.5;
            transition: opacity 0.3s ease;
        }

        .toggle-controls-btn:hover {
            opacity: 1;
        }

        .format-toggle {
            background: linear-gradient(135deg, #FF5722, #FF9800);
        }

        .time-seconds {
            font-size: 0.7em;
            opacity: 0.7;
        }

        /* 颜色主题 */
        body.theme-blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
        body.theme-red { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%); }
        body.theme-green { background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%); }
        body.theme-yellow { background: linear-gradient(135deg, #f9ca24 0%, #f0932b 100%); }
        body.theme-pink { background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%); }
        body.theme-cyan { background: linear-gradient(135deg, #00cec9 0%, #0984e3 100%); }
        body.theme-orange { background: linear-gradient(135deg, #ff9ff3 0%, #feca57 100%); }
        body.theme-purple { background: linear-gradient(135deg, #a55eea 0%, #8854d0 100%); }

        body.theme-blue .time-display { color: #fff; }
        body.theme-red .time-display { color: #fff; }
        body.theme-green .time-display { color: #fff; }
        body.theme-yellow .time-display { color: #fff; }
        body.theme-pink .time-display { color: #fff; }
        body.theme-cyan .time-display { color: #fff; }
        body.theme-orange .time-display { color: #fff; }
        body.theme-purple .time-display { color: #fff; }

        body.theme-blue .date-display { color: rgba(255, 255, 255, 0.95); }
        body.theme-red .date-display { color: rgba(255, 255, 255, 0.95); }
        body.theme-green .date-display { color: rgba(255, 255, 255, 0.95); }
        body.theme-yellow .date-display { color: rgba(255, 255, 255, 0.95); }
        body.theme-pink .date-display { color: rgba(255, 255, 255, 0.95); }
        body.theme-cyan .date-display { color: rgba(255, 255, 255, 0.95); }
        body.theme-orange .date-display { color: rgba(255, 255, 255, 0.95); }
        body.theme-purple .date-display { color: rgba(255, 255, 255, 0.95); }

        body.theme-blue .week-display { color: rgba(255, 255, 255, 0.85); }
        body.theme-red .week-display { color: rgba(255, 255, 255, 0.85); }
        body.theme-green .week-display { color: rgba(255, 255, 255, 0.85); }
        body.theme-yellow .week-display { color: rgba(255, 255, 255, 0.85); }
        body.theme-pink .week-display { color: rgba(255, 255, 255, 0.85); }
        body.theme-cyan .week-display { color: rgba(255, 255, 255, 0.85); }
        body.theme-orange .week-display { color: rgba(255, 255, 255, 0.85); }
        body.theme-purple .week-display { color: rgba(255, 255, 255, 0.85); }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .time-display {
                font-size: 22vw;
            }

            .date-display {
                font-size: 5vw;
            }

            .week-display {
                font-size: 3vw;
            }

            .controls {
                gap: 0.5rem;
                padding: 0.8rem 1rem;
            }

            .btn {
                padding: 0.6rem 1.2rem;
                font-size: 0.9rem;
            }

            .color-btn {
                width: 40px;
                height: 40px;
            }
        }

        /* 全屏模式下隐藏控制面板 */
        body:fullscreen .controls {
            opacity: 0;
            pointer-events: none;
        }

        body:fullscreen .controls:not(.hovered):hover {
            opacity: 1;
            pointer-events: auto;
        }

        /* 移动设备全屏模式 */
        body.fullscreen-mode .controls {
            opacity: 0;
            pointer-events: none;
        }

        /* 点击显示提示 */
        .hint {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 1rem 2rem;
            border-radius: 10px;
            font-size: 1.2rem;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: 2000;
        }

        .hint.show {
            opacity: 1;
        }

/* ===== tool/templates/tools/teacher-toolkit.html ===== */
/* 学生管理相关样式 */
        .student-management-container {
            transition: all 0.4s ease;
        }

        .student-management-container.hidden {
            display: none;
        }

        .student-management {
            background: white;
            border-radius: 18px;
            padding: 2.5rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            margin: 2.5rem 0;
            position: relative;
            overflow: visible;
        }

        .student-management::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 6px;
            background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
            border-radius: 18px 18px 0 0;
        }

        .student-management.hidden {
            transform: translateY(-20px);
            opacity: 0;
            pointer-events: none;
            max-height: 0;
            padding: 0 !important;
            margin: 0 !important;
            border: none;
            overflow: hidden;
            display: none;
        }

        .student-management h2 {
            color: #182848;
            margin-bottom: 1.8rem;
            font-size: 2rem;
            font-weight: 700;
            text-align: center;
        }

        .student-input-section {
            margin-bottom: 2.2rem;
        }

        .input-group {
            display: flex;
            gap: 1.2rem;
            margin-bottom: 1.2rem;
            flex-wrap: wrap;
        }

        .input-group input {
            flex: 1;
            min-width: 150px;
            padding: 1rem;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 1.1rem;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.9);
        }

        .input-group input:focus {
            border-color: #4b6cb7;
            box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
            outline: none;
        }

        .btn {
            background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
            color: white;
            border: none;
            padding: 1rem 2rem;
            font-size: 1.1rem;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            box-shadow: 0 5px 15px rgba(75, 108, 183, 0.4);
            position: relative;
            overflow: hidden;
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(75, 108, 183, 0.6);
        }

        .btn:active {
            transform: translateY(1px);
        }

        .btn:disabled {
            background: linear-gradient(135deg, #cccccc, #999999);
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .btn.add {
            background: linear-gradient(135deg, #4CAF50, #8BC34A);
        }

        .btn.import {
            background: linear-gradient(135deg, #9C27B0, #E040FB);
        }

        .btn.clear {
            background: linear-gradient(135deg, #FF5722, #FF9800);
        }

        .btn.toggle-students {
            background: linear-gradient(135deg, #2196F3, #21CBF3);
            display: block;
            margin: 1.8rem auto;
            padding: 1.2rem 2.5rem;
            font-size: 1.2rem;
        }

        .batch-import {
            margin: 1.3rem 0;
            padding: 1.3rem;
            background: rgba(227, 242, 253, 0.8);
            border-radius: 12px;
            border: 1px solid rgba(179, 219, 255, 0.5);
        }

        .batch-import h3 {
            color: #182848;
            margin-bottom: 0.8rem;
            font-size: 1.3rem;
            font-weight: 600;
        }

        .batch-import textarea {
            width: 100%;
            min-height: 120px;
            padding: 1rem;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-family: monospace;
            margin-bottom: 1.2rem;
            font-size: 1rem;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.9);
        }

        .batch-import textarea:focus {
            border-color: #4b6cb7;
            box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
            outline: none;
        }

        .file-import {
            margin: 1.3rem 0;
            padding: 1.3rem;
            background: rgba(227, 242, 253, 0.8);
            border-radius: 12px;
            border: 1px solid rgba(179, 219, 255, 0.5);
        }

        .file-import h3 {
            color: #182848;
            margin-bottom: 0.8rem;
            font-size: 1.3rem;
            font-weight: 600;
        }

        .file-import input {
            width: 100%;
            margin-bottom: 1.2rem;
            padding: 1rem;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 1rem;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.9);
        }

        .file-import input:focus {
            border-color: #4b6cb7;
            box-shadow: 0 0 0 3px rgba(75, 108, 183, 0.2);
            outline: none;
        }

        .student-list-container {
            max-height: 320px;
            overflow-y: auto;
            border: 1px solid #ddd;
            border-radius: 12px;
            padding: 1.2rem;
            background: rgba(248, 249, 250, 0.9);
            margin-top: 1.5rem;
            scrollbar-width: thin;
            scrollbar-color: #4b6cb7 rgba(248, 249, 250, 0.9);
        }

        /* 自定义滚动条样式（WebKit浏览器） */
        .student-list-container::-webkit-scrollbar {
            width: 8px;
        }

        .student-list-container::-webkit-scrollbar-track {
            background: rgba(248, 249, 250, 0.9);
            border-radius: 4px;
        }

        .student-list-container::-webkit-scrollbar-thumb {
            background: #4b6cb7;
            border-radius: 4px;
        }

        .student-list-container::-webkit-scrollbar-thumb:hover {
            background: #3a5795;
        }

        .student-item {
            padding: 1rem;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
            animation: slideIn 0.3s ease;
            transition: all 0.2s ease;
        }

        .student-item:hover {
            background: rgba(227, 242, 253, 0.6);
            border-radius: 8px;
        }

        .student-item:last-child {
            border-bottom: none;
        }

        .student-info {
            flex: 1;
        }

        .student-id {
            font-weight: bold;
            color: #4b6cb7;
        }

        .remove-student {
            background: #ff416c;
            color: white;
            border: none;
            padding: 0.4rem 0.8rem;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.9rem;
        }

        .remove-student:hover {
            background: #ff1a4f;
            transform: scale(1.1);
        }

        .student-summary {
            display: flex;
            justify-content: center;
            gap: 2.2rem;
            margin-top: 1.8rem;
            flex-wrap: wrap;
        }

        .summary-card {
            background: rgba(227, 242, 253, 0.8);
            border-radius: 14px;
            padding: 1.7rem;
            text-align: center;
            min-width: 160px;
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(179, 219, 255, 0.5);
            transition: all 0.3s ease;
        }

        .summary-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        }

        .summary-value {
            font-size: 2.2rem;
            font-weight: bold;
            color: #182848;
        }

        .summary-label {
            font-size: 1.1rem;
            color: #555;
            margin-top: 0.5rem;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .empty-list {
            text-align: center;
            color: #999;
            padding: 2rem;
        }

        /* 分类标题样式 */
        .category-title {
            font-size: 1.8rem;
            font-weight: 700;
            color: #182848;
            margin: 3rem 0 2rem 0;
            padding-bottom: 1rem;
            border-bottom: 3px solid linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
            position: relative;
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .category-title::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 60px;
            height: 3px;
            background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
        }

        .category-title.management {
            background: linear-gradient(90deg, rgba(75, 108, 183, 0.1), transparent);
            padding-left: 1rem;
            border-radius: 8px;
        }

        .category-title.management::before {
            background: linear-gradient(90deg, #2196F3, #21CBF3);
        }

        .category-title.chinese {
            background: linear-gradient(90deg, rgba(244, 67, 54, 0.1), transparent);
            padding-left: 1rem;
            border-radius: 8px;
        }

        .category-title.chinese::before {
            background: linear-gradient(90deg, #ff6b6b, #ee5a24);
        }

        .category-title.math {
            background: linear-gradient(90deg, rgba(255, 152, 0, 0.1), transparent);
            padding-left: 1rem;
            border-radius: 8px;
        }

        .category-title.math::before {
            background: linear-gradient(90deg, #f9ca24, #f0932b);
        }

/* ===== tool/templates/tools/sound-detector.html ===== */
.sound-detector-wrapper {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: calc(100vh - 100px);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 2rem;
            border-radius: 10px;
            margin-top: 1rem;
        }

        .sound-detector-wrapper .container {
            width: 100%;
            max-width: 1000px;
            text-align: center;
        }

        .sound-detector-wrapper h1 {
            color: #182848;
            margin-bottom: 1rem;
            font-size: 2.5rem;
        }

        .sound-detector-wrapper p.description {
            color: #555;
            margin-bottom: 2rem;
            font-size: 1.2rem;
        }

        .sound-detector-wrapper .controls {
            margin-bottom: 2rem;
        }

        .sound-detector-wrapper button {
            background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
            color: white;
            border: none;
            padding: 1rem 2rem;
            font-size: 1.1rem;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            box-shadow: 0 5px 15px rgba(75, 108, 183, 0.4);
            margin: 0 0.5rem;
        }

        .sound-detector-wrapper button:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(75, 108, 183, 0.6);
        }

        .sound-detector-wrapper button.stop {
            background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
            box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
        }

        .sound-detector-wrapper button.stop:hover {
            box-shadow: 0 8px 20px rgba(255, 65, 108, 0.6);
        }

        .sound-detector-wrapper .visualization {
            background: white;
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            margin: 2rem 0;
        }

        .sound-detector-wrapper .ball-container {
            height: 400px;
            position: relative;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
            overflow: hidden;
        }

        .sound-detector-wrapper .ball {
            width: 80px;
            height: 80px;
            background: radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b);
            border-radius: 50%;
            position: absolute;
            left: 50%;
            bottom: 10px;
            transform: translateX(-50%);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
                        inset -10px -10px 20px rgba(0, 0, 0, 0.2),
                        inset 10px 10px 20px rgba(255, 255, 255, 0.3);
            transition: bottom 0.1s ease-out;
        }

        .sound-detector-wrapper .level-indicator {
            display: flex;
            justify-content: space-around;
            margin-top: 1.5rem;
        }

        .sound-detector-wrapper .level {
            text-align: center;
            padding: 1rem;
            border-radius: 10px;
            background: #f8f9fa;
            min-width: 150px;
        }

        .sound-detector-wrapper .level-value {
            font-size: 2.5rem;
            font-weight: bold;
            color: #4b6cb7;
        }

        .sound-detector-wrapper .level-label {
            color: #555;
            margin-top: 0.5rem;
            font-size: 1rem;
        }

        .sound-detector-wrapper .sensitivity {
            margin-top: 2rem;
        }

        .sound-detector-wrapper .sensitivity label {
            display: block;
            margin-bottom: 0.5rem;
            color: #555;
            font-size: 1.1rem;
        }

        .sound-detector-wrapper .sensitivity input[type="range"] {
            width: 100%;
            max-width: 400px;
            height: 10px;
            border-radius: 5px;
            background: #d3d3d3;
            outline: none;
            -webkit-appearance: none;
        }

        .sound-detector-wrapper .sensitivity input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            background: #4b6cb7;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        .sound-detector-wrapper .back-btn {
            margin-top: 2rem;
        }

        .sound-detector-wrapper .status {
            margin-top: 1rem;
            padding: 1rem;
            border-radius: 10px;
            font-size: 1.1rem;
        }

        .sound-detector-wrapper .status.active {
            background: #d4edda;
            color: #155724;
        }

        .sound-detector-wrapper .status.inactive {
            background: #f8d7da;
            color: #721c24;
        }

        .sound-detector-wrapper .status.error {
            background: #f8d7da;
            color: #721c24;
        }

        @media (max-width: 768px) {
            .sound-detector-wrapper h1 {
                font-size: 1.8rem;
            }

            .sound-detector-wrapper .ball-container {
                height: 300px;
            }

            .sound-detector-wrapper .ball {
                width: 60px;
                height: 60px;
            }

            .sound-detector-wrapper .level-indicator {
                flex-direction: column;
                gap: 1rem;
            }

            .sound-detector-wrapper .level {
                width: 100%;
            }
        }

/* ===== tool/templates/tools/timer.html ===== */
.timer-wrapper {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        min-height: calc(100vh - 100px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        border-radius: 10px;
        margin-top: 1rem;
    }

    .timer-wrapper .container {
        width: 100%;
        max-width: 800px;
        text-align: center;
    }

    .timer-wrapper h1 {
        color: white;
        margin-bottom: 1rem;
        font-size: 2.5rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .timer-wrapper .controls {
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .timer-wrapper button {
        background: white;
        color: #667eea;
        border: none;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        border-radius: 25px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        margin: 0.5rem;
    }

    .timer-wrapper button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .timer-wrapper button:active {
        transform: translateY(0);
    }

    .timer-wrapper button.primary {
        background: #fff;
        color: #667eea;
    }

    .timer-wrapper button.stop {
        background: #ff6b6b;
        color: white;
    }

    .timer-wrapper button.stop:hover {
        background: #ff5252;
    }

    .timer-wrapper button.reset {
        background: #4b6cb7;
        color: white;
    }

    .timer-wrapper button.reset:hover {
        background: #3a5795;
    }

    .timer-wrapper button.fullscreen {
        background: #f39c12;
        color: white;
    }

    .timer-wrapper button.fullscreen:hover {
        background: #e67e22;
    }

    .timer-wrapper .timer-display {
        background: white;
        border-radius: 30px;
        padding: 3rem;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        margin: 2rem 0;
        position: relative;
    }

    .timer-wrapper .time {
        font-size: 5rem;
        font-weight: bold;
        color: #667eea;
        font-family: 'Courier New', monospace;
        letter-spacing: 0.1em;
    }

    .timer-wrapper .time.warning {
        color: #f39c12;
        animation: pulse 1s ease-in-out infinite;
    }

    .timer-wrapper .time.critical {
        color: #ff6b6b;
        animation: pulse 0.5s ease-in-out infinite;
    }

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

    .timer-wrapper .preset-times {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 2rem;
        flex-wrap: wrap;
    }

    .timer-wrapper .preset-btn {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.4);
        padding: 0.6rem 1.2rem;
        border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 600;
        margin: 0.3rem;
    }

    .timer-wrapper .preset-btn:hover {
        background: rgba(255, 255, 255, 0.4);
        transform: translateY(-2px);
    }

    .timer-wrapper .mode-selector {
        margin-bottom: 2rem;
    }

    .timer-wrapper .mode-btn {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.4);
        padding: 0.6rem 1.5rem;
        border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 600;
        margin: 0.5rem;
    }

    .timer-wrapper .mode-btn:hover {
        background: rgba(255, 255, 255, 0.4);
    }

    .timer-wrapper .mode-btn.active {
        background: white;
        color: #667eea;
        border-color: white;
    }

    .timer-wrapper .input-section {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-bottom: 2rem;
        align-items: center;
    }

    .timer-wrapper .input-section input {
        padding: 0.8rem 1rem;
        border: 2px solid rgba(255, 255, 255, 0.4);
        border-radius: 15px;
        font-size: 1.2rem;
        width: 100px;
        text-align: center;
        background: rgba(255, 255, 255, 0.9);
        color: #667eea;
        font-weight: 600;
        outline: none;
    }

    .timer-wrapper .input-section input:focus {
        border-color: white;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    }

    .timer-wrapper .input-section label {
        color: white;
        font-weight: 600;
        font-size: 1.1rem;
    }

    .timer-wrapper .progress-bar {
        width: 100%;
        height: 8px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 4px;
        margin-top: 2rem;
        overflow: hidden;
    }

    .timer-wrapper .progress-fill {
        height: 100%;
        background: white;
        border-radius: 4px;
        transition: width 0.3s ease;
    }

    .timer-wrapper .back-btn {
        margin-top: 2rem;
    }

    .timer-wrapper .status {
        color: white;
        font-size: 1.2rem;
        margin-top: 1rem;
        font-weight: 600;
    }

    .fullscreen-active {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        z-index: 9999;
    }

    @media (max-width: 768px) {
        .timer-wrapper h1 {
            font-size: 1.8rem;
        }

        .timer-wrapper .time {
            font-size: 3rem;
        }

        .timer-wrapper .timer-display {
            padding: 2rem;
        }
    }

/* ===== tool/templates/tools/whiteboard.html ===== */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', 'Microsoft YaHei', sans-serif;
            background: #f0f2f5;
            min-height: 100vh;
            display: flex;
            overflow: hidden;
        }

        .sidebar {
            width: 200px;
            background: white;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #e0e0e0;
            box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
            z-index: 100;
            overflow-y: auto;
        }

        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .top-toolbar {
            background: white;
            padding: 0.8rem 1.2rem;
            display: flex;
            gap: 1rem;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #e0e0e0;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .toolbar-group {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }

        .toolbar-btn {
            padding: 0.5rem 1rem;
            border: 2px solid #e0e0e0;
            background: white;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.2s ease;
            color: #333;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }

        .toolbar-btn:hover {
            background: #f8f9fa;
            transform: translateY(-2px);
        }

        .toolbar-btn.primary {
            background: linear-gradient(135deg, #4b6cb7, #182848);
            color: white;
            border-color: #4b6cb7;
        }

        .toolbar-btn.danger {
            background: linear-gradient(135deg, #ff416c, #ff4b2b);
            color: white;
            border-color: #ff416c;
        }

        .toolbar-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .back-btn {
            padding: 0.5rem 1rem;
            border: 2px solid #e0e0e0;
            background: white;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.2s ease;
            color: #333;
        }

        .back-btn:hover {
            background: #f8f9fa;
            transform: translateY(-2px);
        }

        .sidebar-section {
            padding: 1rem;
            border-bottom: 1px solid #f0f0f0;
        }

        .sidebar-title {
            font-size: 0.75rem;
            color: #666;
            font-weight: 600;
            margin-bottom: 0.6rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-top: 0.5rem;
        }

        .sidebar-section:first-child .sidebar-title {
            margin-top: 0;
        }

        .tools-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
        }

        .tool-btn {
            padding: 0.6rem;
            border: 2px solid #e0e0e0;
            background: white;
            border-radius: 6px;
            cursor: pointer;
            font-size: 1.2rem;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .tool-btn:hover {
            background: #f8f9fa;
            transform: translateY(-2px);
        }

        .tool-btn.active {
            background: linear-gradient(135deg, #4b6cb7, #182848);
            color: white;
            border-color: #4b6cb7;
        }

        .color-section {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }

        .color-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .color-input-wrapper {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .color-input-wrapper label {
            font-size: 0.8rem;
            color: #333;
            font-weight: 500;
        }

        input[type="color"] {
            width: 50px;
            height: 36px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            cursor: pointer;
            background: white;
        }

        .eyedropper-btn {
            padding: 0.5rem 0.8rem;
            border: 2px solid #e0e0e0;
            background: white;
            border-radius: 6px;
            cursor: pointer;
            font-size: 1rem;
            transition: all 0.2s ease;
        }

        .eyedropper-btn:hover {
            background: #f8f9fa;
            transform: translateY(-2px);
        }

        .eyedropper-btn.active {
            background: linear-gradient(135deg, #4b6cb7, #182848);
            color: white;
            border-color: #4b6cb7;
        }

        .slider-wrapper {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.8rem;
        }

        .slider-wrapper label {
            font-size: 0.8rem;
            color: #333;
            font-weight: 500;
            min-width: 35px;
        }

        .slider-wrapper input[type="range"] {
            flex: 1;
            -webkit-appearance: none;
            height: 6px;
            background: #e0e0e0;
            border-radius: 3px;
            outline: none;
        }

        .slider-wrapper input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            background: #4b6cb7;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.1);
        }

        .slider-wrapper span {
            font-size: 0.8rem;
            color: #666;
            min-width: 35px;
            text-align: right;
        }

        .template-dropdown {
            width: 100%;
            padding: 0.6rem;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 0.85rem;
            background: white;
            cursor: pointer;
        }

        .template-dropdown:focus {
            outline: none;
            border-color: #4b6cb7;
        }

        .canvas-container {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 1rem;
            background: #e9ecef;
            position: relative;
            overflow: hidden;
        }

        #whiteboard {
            background: white;
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            cursor: crosshair;
            max-width: 100%;
            max-height: calc(100vh - 100px);
        }

        #whiteboard.eyedropper {
            cursor: crosshair;
        }

        #whiteboard.move {
            cursor: move;
        }

        #whiteboard.move-hover {
            cursor: grab;
        }

        #whiteboard.move-grabbing {
            cursor: grabbing;
        }

        /* 模态框样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background: white;
            padding: 1.5rem 2rem;
            border-radius: 12px;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .modal-content h3 {
            margin-bottom: 1rem;
            color: #333;
        }

        .modal-content input {
            width: 100%;
            padding: 0.8rem;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 1rem;
            margin-bottom: 1rem;
        }

        .modal-content input:focus {
            outline: none;
            border-color: #4b6cb7;
        }

        .modal-buttons {
            display: flex;
            gap: 0.5rem;
            justify-content: flex-end;
        }

        .modal-btn {
            padding: 0.6rem 1.2rem;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .modal-btn.primary {
            background: #4b6cb7;
            color: white;
        }

        .modal-btn.secondary {
            background: #e0e0e0;
            color: #333;
        }

        /* 黑夜模式 */
        body.dark-mode {
            background: #1a1a2e;
        }

        body.dark-mode .sidebar {
            background: #2d3748;
            border-right-color: #4a5568;
        }

        body.dark-mode .sidebar-section {
            border-bottom-color: #4a5568;
        }

        body.dark-mode .sidebar-title {
            color: #a0aec0;
        }

        body.dark-mode .tool-btn {
            background: #4a5568;
            border-color: #4a5568;
        }

        body.dark-mode .tool-btn:hover {
            background: #5a6578;
        }

        body.dark-mode .top-toolbar {
            background: #2d3748;
            border-bottom-color: #4a5568;
        }

        body.dark-mode .toolbar-btn {
            background: #4a5568;
            border-color: #4a5568;
            color: #e2e8f0;
        }

        body.dark-mode .toolbar-btn:hover {
            background: #5a6578;
        }

        body.dark-mode .back-btn {
            background: #4a5568;
            border-color: #4a5568;
            color: #e2e8f0;
        }

        body.dark-mode .back-btn:hover {
            background: #5a6578;
        }

        body.dark-mode .eyedropper-btn {
            background: #4a5568;
            border-color: #4a5568;
            color: #e2e8f0;
        }

        body.dark-mode .eyedropper-btn:hover {
            background: #5a6578;
        }

        body.dark-mode .color-input-wrapper label {
            color: #a0aec0;
        }

        body.dark-mode .slider-wrapper label,
        body.dark-mode .slider-wrapper span {
            color: #a0aec0;
        }

        body.dark-mode .template-dropdown {
            background: #4a5568;
            border-color: #4a5568;
            color: #e2e8f0;
        }

        body.dark-mode .modal-content {
            background: #2d3748;
            color: #e2e8f0;
        }

        body.dark-mode .modal-content h3 {
            color: #e2e8f0;
        }

        body.dark-mode .modal-content input {
            background: #4a5568;
            border-color: #4a5568;
            color: #e2e8f0;
        }

        /* 全屏模式 */
        body.fullscreen {
            overflow: hidden;
        }

        body.fullscreen .sidebar,
        body.fullscreen .top-toolbar {
            display: none;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .sidebar {
                width: 180px;
            }

            .top-toolbar {
                flex-wrap: wrap;
                padding: 0.6rem 1rem;
            }

            .toolbar-group {
                flex-wrap: wrap;
            }

            .toolbar-btn {
                padding: 0.4rem 0.6rem;
                font-size: 0.75rem;
            }

            .tools-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .tool-btn {
                font-size: 1rem;
            }
        }
