* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    padding: 40px 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: #5856d6;
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 10px;
}

.header p {
    color: #86868b;
    font-size: 16px;
}

.current-time-banner {
    max-width: 1000px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #5856d6 0%, #7b79e8 100%);
    border-radius: 16px;
    padding: 30px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 20px rgba(88, 86, 214, 0.2);
}

.time-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.time-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-item .label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 6px;
}

.time-item .value {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.converter-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.converter-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.converter-card h2 {
    font-size: 20px;
    color: #1d1d1f;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.converter-card h2 .icon {
    font-size: 24px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: #1d1d1f;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="datetime-local"],
input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e5e7;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

input:focus {
    outline: none;
    border-color: #5856d6;
    box-shadow: 0 0 0 3px rgba(88, 86, 214, 0.1);
}

.unit-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.unit-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #e5e5e7;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

.unit-btn:hover {
    border-color: #5856d6;
    background: #f5f5ff;
}

.unit-btn.active {
    border-color: #5856d6;
    background: #5856d6;
    color: white;
}

.convert-btn {
    width: 100%;
    padding: 14px;
    background: #5856d6;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.convert-btn:hover {
    background: #4745c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88, 86, 214, 0.3);
}

.convert-btn:active {
    transform: translateY(0);
}

.result-box {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #5856d6;
    display: none;
}

.result-box.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-box .result-label {
    font-size: 12px;
    color: #86868b;
    margin-bottom: 6px;
}

.result-box .result-value {
    font-size: 16px;
    color: #1d1d1f;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.copy-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: white;
    color: #5856d6;
    border: 1px solid #5856d6;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #5856d6;
    color: white;
}

.feature-cards {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 16px;
    color: #1d1d1f;
    margin-bottom: 8px;
    font-weight: 600;
}

.feature-card p {
    font-size: 13px;
    color: #86868b;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .converter-container {
        grid-template-columns: 1fr;
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

    .time-row {
        gap: 20px;
    }
}

/* 格式转换部分 */
.format-section {
    max-width: 1000px;
    margin: 0 auto 40px;
}

.section-title {
    font-size: 24px;
    color: #1d1d1f;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.format-converter {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.format-input-group {
    margin-bottom: 25px;
}

.format-input-group label {
    display: block;
    font-size: 14px;
    color: #1d1d1f;
    margin-bottom: 10px;
    font-weight: 500;
}

.format-input-row {
    display: flex;
    gap: 10px;
}

.format-input-row input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e5e7;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
}

.format-input-row input:focus {
    outline: none;
    border-color: #5856d6;
    box-shadow: 0 0 0 3px rgba(88, 86, 214, 0.1);
}

.format-btn {
    padding: 12px 24px;
    background: #5856d6;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.format-btn:hover {
    background: #4745c7;
    transform: translateY(-1px);
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.format-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border-left: 3px solid #5856d6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.format-name {
    font-size: 12px;
    color: #86868b;
    font-weight: 600;
}

.format-value {
    font-size: 14px;
    color: #1d1d1f;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    flex: 1;
}

.format-copy-btn {
    padding: 6px 12px;
    background: white;
    color: #5856d6;
    border: 1px solid #5856d6;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
}

.format-copy-btn:hover {
    background: #5856d6;
    color: white;
}

/* 代码示例部分 */
.code-examples-section {
    max-width: 1000px;
    margin: 0 auto 40px;
}

.language-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.lang-tab {
    padding: 10px 20px;
    background: white;
    color: #1d1d1f;
    border: 2px solid #e5e5e7;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-tab:hover {
    border-color: #5856d6;
    background: #f5f5ff;
}

.lang-tab.active {
    background: #5856d6;
    color: white;
    border-color: #5856d6;
}

.code-content {
    background: #2d2d2d;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.code-content pre {
    margin: 0 !important;
    padding: 25px !important;
    overflow-x: auto;
    background: transparent !important;
    border-radius: 0 !important;
}

.code-content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    display: block;
    white-space: pre;
}

.code-content pre[class*="language-"] {
    background: transparent !important;
}

.code-content code[class*="language-"] {
    background: transparent !important;
    text-shadow: none !important;
}

@media (max-width: 768px) {
    .format-grid {
        grid-template-columns: 1fr;
    }
    
    .format-input-row {
        flex-direction: column;
    }
    
    .format-btn {
        width: 100%;
    }
    
    .language-tabs {
        justify-content: flex-start;
    }
    
    .code-content pre {
        padding: 15px;
    }
    
    .code-content code {
        font-size: 12px;
    }
}

.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9em;
    margin-top: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.footer a {
    color: #666;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}
