/* 随机数生成器样式 */
.random-generator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* 标签页样式 */
.generator-tabs {
    display: flex;
    margin-bottom: 24px;
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: relative;
}

.tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 16px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.tab-btn:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.tab-btn.active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #3498db;
    border-radius: 3px 3px 0 0;
}

.tab-btn:active {
    color: #2980b9;
    background: rgba(52, 152, 219, 0.15);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 表单样式 */
.generator-form {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 24px;
}

.form-group {
    flex: 1;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.toggle-group {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.toggle-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.toggle-option input[type="radio"] {
    margin-right: 8px;
}

.toggle-label {
    font-weight: normal;
    color: #555;
}

/* 复选框样式 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    margin-right: 8px;
}

.checkbox-label {
    font-weight: normal;
    color: #555;
}

/* 自定义选项 */
.custom-options {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.custom-options.hidden {
    display: none;
}

.generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generate-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
    background: linear-gradient(135deg, #1f618d, #154360);
}

/* 结果容器 */
.result-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

.result-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.result-display {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.result-display.animate {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.numbers-container,
.strings-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.number-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: 0 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.number-item.show {
    opacity: 1;
    transform: translateY(0);
}

.string-item {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #2c3e50;
    word-break: break-all;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.string-item.show {
    opacity: 1;
    transform: translateY(0);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
    color: #ddd;
}

.empty-state p {
    margin: 0;
    font-size: 16px;
}



/* 历史记录 */
.history-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.history-container h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: #2c3e50;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 12px;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.history-time {
    font-weight: 500;
}

.history-numbers,
.history-strings {
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    word-break: break-all;
}

/* 提示信息 */
.tool-hint {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    margin: 0;
}

/* Toast 提示 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-error {
    background: #e74c3c;
}

.toast-success {
    background: #2ecc71;
}

.toast-info {
    background: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .random-generator-container {
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .toggle-group {
        flex-direction: column;
        gap: 8px;
    }
    
    
    
    .numbers-container {
        gap: 8px;
    }
    
    .number-item {
        min-width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .result-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .random-generator-container {
        color: #e0e0e0;
    }
    
    .generator-tabs {
        background: #2c3e50;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    .tab-btn {
        color: #bdc3c7;
    }
    
    .tab-btn:hover {
        color: #3498db;
        background: rgba(52, 152, 219, 0.1);
    }
    
    .tab-btn.active {
        color: #3498db;
        background: rgba(52, 152, 219, 0.15);
    }
    
    .generator-form,
    .result-container,
    .history-container {
        background: #2c3e50;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    .form-label,
    .result-header h3,
    .history-container h3 {
        color: #ecf0f1;
    }
    
    .form-input {
        background: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .form-input:focus {
        border-color: #3498db;
    }
    
    .toggle-label {
        color: #bdc3c7;
    }
    
    .result-display,
    .history-item {
        background: #34495e;
    }
    
    .number-item {
        background: #2c3e50;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .action-btn {
        background: #34495e;
        color: #bdc3c7;
    }
    
    .action-btn:hover {
        background: #4a5f7a;
        color: #ecf0f1;
    }
    
    .empty-state {
        color: #95a5a6;
    }
    
    .empty-state i {
        color: #7f8c8d;
    }
}