* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

nav a {
    margin-left: 30px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

nav a:hover {
    color: #667eea;
}

footer {
    background: rgba(255, 255, 255, 0.95);
    margin-top: 50px;
    padding: 30px 20px;
    text-align: center;
    color: #666;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-clear {
    background: #f56565;
    color: white;
}

.btn-clear:hover {
    background: #e53e3e;
}

.btn-copy {
    background: #ed8936;
    color: white;
    margin-top: 10px;
}

.btn-copy:hover {
    background: #dd6b20;
}


/* 深色主题 */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-theme header,
body.dark-theme footer {
    background: rgba(30, 30, 30, 0.95);
    color: #e0e0e0;
}

body.dark-theme .logo {
    color: #8b9cff;
}

body.dark-theme nav a {
    color: #b0b0b0;
}

body.dark-theme nav a:hover {
    color: #8b9cff;
}

body.dark-theme .tool-card {
    background: #2a2a3e;
    color: #e0e0e0;
}

body.dark-theme .tool-card h3 {
    color: #8b9cff;
}

body.dark-theme .tool-card p {
    color: #b0b0b0;
}

body.dark-theme .tool-content {
    background: #2a2a3e;
    color: #e0e0e0;
}

body.dark-theme textarea {
    background: #1a1a2e;
    color: #e0e0e0;
    border-color: #3a3a4e;
}

body.dark-theme label {
    color: #e0e0e0;
}

body.dark-theme .option-item:hover {
    background: #3a3a4e;
}

body.dark-theme .stats {
    background: #1a1a2e;
}

body.dark-theme .stats span {
    color: #b0b0b0;
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tool-card {
    animation: fadeIn 0.5s ease-out;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

body.dark-theme ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: rgba(139, 156, 255, 0.5);
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 156, 255, 0.8);
}


/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-out;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: #48bb78;
}

.toast-warning {
    background: #ed8936;
}

.toast-error {
    background: #f56565;
}

.toast-info {
    background: #667eea;
}
