/* TypeFlow Pro 样式文件 */

/* 基础样式 */


body {
    background: url('/assets/img/bg.png') no-repeat center center fixed;
    background-size: cover;
}

.typeflow-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    color: #fff;
}

.hero-section {

    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    text-shadow: 2px 2px 2px rgba(2, 116, 255, 0.598);
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4facfe 100%, #00f2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* 内容布局 */
.content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 25px;
    margin-bottom: 50px;
}

@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* 玻璃卡片样式 */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 24px;
    margin-bottom: 20px;
    color: #fff;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* 控制面板 */
.control-panel h2 {
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.glass-select:focus {
    outline: none;
    border-color: rgba(100, 200, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(100, 200, 255, 0.2);
}

.glass-select option {
    background-color: rgba(30, 30, 40, 0.9);
    color: #fff;
}

/* 按钮样式 */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 25px 0;
}

.primary-btn,
.secondary-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.primary-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.3);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.primary-btn:disabled,
.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 统计预览 */
.stats-preview h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* 打字区域 */
.typing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 18px 24px;
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 700;
}

.live-stats {
    display: flex;
    gap: 25px;
}

.live-stat {
    text-align: center;
}

.live-stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.live-stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
}

/* 文本显示区域 */
.text-display {
    margin-bottom: 25px;
    min-height: 200px;
}

.text-content {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 25px;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    min-height: 150px;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
}

.typing-input {
    width: 100%;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: all 0.3s ease;
}

.typing-input:focus {
    outline: none;
    border-color: rgba(100, 200, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.1);
}

.typing-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 字符状态 */
.char-correct {
    color: #4ade80;
}

.char-wrong {
    color: #f87171;
    text-decoration: underline;
}

.char-current {
    background-color: rgba(100, 200, 255, 0.2);
    border-radius: 3px;
}

.char-pending {
    opacity: 0.7;
}

/* 可视化区域 */
.visualization-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 25px;
}

@media (max-width: 768px) {
    .visualization-section {
        grid-template-columns: 1fr;
    }
}

.visualization-card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container {
    height: 180px;
    margin-bottom: 15px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.legend-item.slow::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background-color: #ef4444;
}

.legend-item.medium::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background-color: #f59e0b;
}

.legend-item.fast::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background-color: #10b981;
}

/* 键盘错误图 */
.keyboard-error-map {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.key {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.key-wide {
    width: 60px;
}

.key-space {
    width: 180px;
}

.key-error-none {
    background: rgba(255, 255, 255, 0.05);
}

.key-error-low {
    background: rgba(245, 158, 11, 0.2);
}

.key-error-medium {
    background: rgba(245, 158, 11, 0.4);
}

.key-error-high {
    background: rgba(239, 68, 68, 0.4);
}

.key-error-very-high {
    background: rgba(239, 68, 68, 0.7);
}

.error-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.error-stat {
    text-align: center;
}

.error-stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.error-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

/* 分析面板 */
.analysis-panel h2 {
    margin-bottom: 25px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.analysis-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.patterns-list,
.tips-list {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    min-height: 100px;
}

.empty-state {
    text-align: center;
    opacity: 0.6;
    padding: 20px 0;
}

.pattern-item,
.tip-item {
    padding: 10px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #4facfe;
}

.pattern-item:last-child,
.tip-item:last-child {
    margin-bottom: 0;
}

.pattern-key {
    font-weight: 700;
    color: #4facfe;
}

.pattern-count {
    float: right;
    font-weight: 700;
}

.chart-container-small {
    height: 150px;
}

.summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.summary-stat {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.result-highlights {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.result-highlight {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    min-width: 120px;
}

.result-highlight.primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.result-highlight.secondary {
    background: rgba(255, 255, 255, 0.1);
}

.result-highlight.tertiary {
    background: rgba(255, 255, 255, 0.05);
}

.result-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.result-label {
    font-size: 1rem;
    opacity: 0.9;
}

.result-details {
    margin-bottom: 30px;
}

.result-details h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
}

.detail-label {
    opacity: 0.8;
}

.detail-value {
    font-weight: 700;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 页脚 */
.page-footer {
    text-align: center;
    padding: 25px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content p {
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-content a {
    color: #4facfe;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-content a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .live-stats {
        flex-direction: column;
        gap: 15px;
    }

    .result-highlights {
        flex-direction: column;
        gap: 15px;
    }

    .result-highlight {
        min-width: auto;
    }

    .modal-actions {
        flex-direction: column;
    }
}

/* 动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}