/* 页面标题样式 */
.title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

body {
    margin: 0;
    background-color: #f8fafc;
}

.title .icon {
    color: #4f46e5;
}

/* 计算器卡片样式 */
.calculator-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title .icon {
    color: #4f46e5;
}

@media (min-width: 768px) {

}

/* 表单组样式 */
.form-group {
    display: flex;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label .icon {
    color: #6b7280;
}

/* 输入框样式 */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: white;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-suffix {
    position: absolute;
    right: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    pointer-events: none;
}

/* 单选按钮组样式 */
.radio-group {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 1rem;
    height: 1rem;
    accent-color: #4f46e5;
}

.radio-label {
    font-size: 0.875rem;
    color: #374151;
}

/* 按钮样式 */
.button-container {
    display: flex;
    margin-top: 2rem;
}

.calculate-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 0.575rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.calculate-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(0, 0, 0, 0.15);
}

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

/* 结果展示区域 */
.result-section {
    margin-top: 2rem;
}

.result-section.hidden {
    display: none;
}

.result-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #2c3e50;
}

/* 表格样式 */
.result-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.result-table th,
.result-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.result-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.result-table tbody tr:hover {
    background: #f8f9fa;
}

.result-table tbody tr:last-child td {
    border-bottom: none;
}

.format-label {
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    width: 120px;
}

.result-text {
    color: #2c3e50;
    word-break: break-all;
    min-width: 200px;
}

.action-cell {
    width: 60px;
    text-align: center;
}

/* 复制按钮样式 */
.copy-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

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

.copy-btn.copy-success {
    background: #28a745;
    animation: pulse 0.3s ease;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .result-table th,
    .result-table td {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .format-label {
        width: 80px;
    }
    
    .result-text {
        min-width: 150px;
        font-size: 0.85rem;
    }
    
    .action-cell {
        width: 50px;
    }
    
    .copy-btn {
        padding: 4px 6px;
    }
}

/* 信息卡片样式 */
.info-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.info-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-title .icon {
    color: #3b82f6;
}

.info-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 0.5rem;
}

.info-content h4:first-child {
    margin-top: 0;
}

.info-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.info-content li {
    margin: 0.25rem 0;
    color: #4b5563;
    line-height: 1.5;
}

.example-box {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.example-box p {
    margin: 0.5rem 0;
    color: #374151;
}

.example-box p:first-child {
    margin-top: 0;
}

.example-box p:last-child {
    margin-bottom: 0;
}

.form-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

/* 导航链接激活状态 */
.nav-link.active {
    color: #4f46e5;
    background-color: #eef2ff;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calculator-card {
        padding: 1.5rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    
    
    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-links {
        display: none;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section {
    animation: fadeIn 0.3s ease-out;
}

/* 错误状态样式 */
.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 成功提示样式 */
.copy-success {
    background: #10b981 !important;
}

.copy-success::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.875rem;
}

.copy-success svg {
    opacity: 0;
}