/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --primary-gradient: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    --secondary-gradient: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --bg-color: #0c1222;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(6, 182, 212, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: rgba(241, 245, 249, 0.7);
    --text-tertiary: rgba(241, 245, 249, 0.5);
    --input-bg: rgba(6, 182, 212, 0.08);
    --hover-bg: rgba(6, 182, 212, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(6, 182, 212, 0.1);
    --shadow-lg: 0 8px 40px rgba(6, 182, 212, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* 背景动画 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float 20s infinite ease-in-out;
}
.circle-1
 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #06b6d4, #0ea5e9);
    top: -300px;
    left: -300px;
    animation-delay: 0s;
}

.circle-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    top: 40%;
    right: -250px;
    animation-delay: -7s;
}

.circle-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #10b981, #34d399);
    bottom: -200px;
    left: 40%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

/* 主容器 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.logo-icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
    animation: float-gentle 6s ease-in-out infinite;
}

.logo-lucide {
    width: 36px;
    height: 36px;
    color: white;
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}
/
* 实时时间卡片 */
.live-time-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.8s ease 0.1s backwards;
    transition: var(--transition);
}

.live-time-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(6, 182, 212, 0.3);
}

.live-time-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.live-time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.live-datetime {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.live-timestamp {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    background: var(--input-bg);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.use-now-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.use-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.use-now-btn i {
    width: 18px;
    height: 18px;
}

/* 转换卡片 */
.converter-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* 输入区域 */
.input-section {
    margin-bottom: 24px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.label-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.input-wrapper {
    position: relative;
    margin-bottom: 8px;
}

#timeInput {
    width: 100%;
    padding: 16px 48px 16px 16px;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

#timeInput:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
}

#timeInput::placeholder {
    color: var(--text-tertiary);
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
    display: none;
}

.clear-btn.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    background: var(--hover-bg);
    color: var(--primary);
}

.clear-btn i {
    width: 18px;
    height: 18px;
}

.input-hint {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}
/* 快捷
操作 */
.quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quick-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 16px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.quick-btn:hover {
    background: var(--hover-bg);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* 转换按钮 */
.convert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.convert-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(6, 182, 212, 0.5);
}

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

.convert-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.convert-btn.loading .btn-icon {
    animation: rotate 1s linear infinite;
}

.btn-icon {
    width: 22px;
    height: 22px;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 结果显示 */
.result-section {
    animation: fadeInUp 0.5s ease;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #10b981;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.result-header i {
    width: 24px;
    height: 24px;
}

.result-grid {
    display: grid;
    gap: 16px;
}

.result-item {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: var(--transition);
}

.result-item:hover {
    background: var(--hover-bg);
    border-color: rgba(6, 182, 212, 0.3);
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    word-break: break-all;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
}

.copy-btn i {
    width: 14px;
    height: 14px;
}

/* 错误提示 */
.error-section {
    animation: shake 0.5s ease;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f43f5e;
    font-weight: 600;
    padding: 16px;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: 12px;
}

.error-header i {
    width: 24px;
    height: 24px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
/
* 历史记录卡片 */
.history-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

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

.history-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.history-header h3 i {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.clear-history-btn {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.clear-history-btn:hover {
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.3);
    color: #f43f5e;
}

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

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: var(--input-bg);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
    opacity: 0.5;
}

.history-empty {
    text-align: center;
    color: var(--text-tertiary);
    padding: 40px 20px;
    font-size: 0.95rem;
}

.history-item {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeInUp 0.3s ease;
}

.history-item:hover {
    background: var(--hover-bg);
    border-color: var(--primary);
    transform: translateX(4px);
}

.history-item-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.history-item-content {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.history-item-label {
    color: var(--text-secondary);
}

.history-item-value {
    color: var(--primary);
    font-weight: 500;
}

/* 使用说明卡片 */
.info-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.info-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.info-item {
    text-align: center;
    padding: 20px;
    background: var(--input-bg);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.info-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.info-icon {
    margin-bottom: 12px;
}

.info-icon i {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.info-item h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.info-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
/
* 页脚 */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    animation: fadeIn 1s ease 0.5s backwards;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Toast通知 */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--primary-gradient);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transform: translateY(120px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 20px;
    height: 20px;
}

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .converter-card,
    .info-card {
        padding: 24px 20px;
    }

    .live-time-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-actions {
        gap: 6px;
    }

    .quick-btn {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .result-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }

    .logo-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .logo-lucide {
        width: 28px;
        height: 28px;
    }

    .live-datetime {
        font-size: 1.2rem;
    }

    .live-timestamp {
        font-size: 1rem;
    }

    .convert-btn {
        font-size: 1rem;
        padding: 14px;
    }
}