:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-color: #f0f6fc;
    --hover-bg: #21262d;
    --thead-bg: #21262d;
    --thead-text: #f0f6fc;
    --border-color: #30363d;
    --time-bg: #21262d;
}

.light-theme {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
    --hover-bg: #e9ecef;
    --thead-bg: #343a40;
    --thead-text: #ffffff;
    --border-color: #dee2e6;
    --time-bg: #f1f3f4;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.nav-header {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, border-color 0.3s;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    margin: 0;
    text-align: center;
    flex: 1;
}

.nav-brand:hover {
    color: #007bff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0.8;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: #007bff;
    background-color: var(--hover-bg);
    text-decoration: none;
    opacity: 1;
}

.nav-link.active {
    color: #007bff;
    font-weight: 600;
    opacity: 1;
}

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding-top: 20px;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
}

.current-time-box {
    background: var(--card-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.current-time-box h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.time-display {
    text-align: center;
    padding: 15px;
}

.time-display label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    display: block;
    margin-bottom: 8px;
}

.time-value {
    background: var(--time-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.card {
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, border-color 0.3s;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
}

.card-text {
    color: var(--text-color);
    opacity: 0.8;
}

.result-box {
    background: var(--time-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    min-height: 50px;
    display: none;
    transition: all 0.3s ease;
}

.result-box.show {
    display: block;
}

.result-item {
    margin-bottom: 10px;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

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

.error {
    color: #dc3545;
    font-weight: 600;
}

.success {
    color: #28a745;
    font-weight: 600;
}

.form-control,
.btn {
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: var(--hover-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--thead-bg);
    border-color: var(--thead-bg);
    color: var(--thead-text);
}

#theme-toggle {
    font-size: 1.2rem;
    padding: 8px 12px;
    border-radius: 50px;
    min-width: auto;
    transition: all 0.3s ease;
    position: absolute;
    right: 0;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

.input-group-text {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

label {
    color: var(--text-color);
    font-weight: 500;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .nav-right {
        margin-left: 0;
        justify-content: center;
        margin-top: 10px;
    }
    
    .nav-brand {
        text-align: center;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .time-display {
        margin-bottom: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}