/* Dark Mode Styles */
body.dark-mode {
    background: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode .navbar {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
}

body.dark-mode .tool-box,
body.dark-mode .tool-card {
    background: #16213e;
    color: #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

body.dark-mode .tool-card h3 {
    color: #e0e0e0;
}

body.dark-mode .tool-card p {
    color: #b0b0b0;
}

body.dark-mode .input-field label {
    color: #b0b0b0;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode textarea,
body.dark-mode select {
    background: #0f3460;
    color: #e0e0e0;
    border-color: #1a1a2e;
}

body.dark-mode .json-output {
    background: #0a0a0a;
}

body.dark-mode .result-card,
body.dark-mode .file-info,
body.dark-mode .history {
    background: #0f3460;
}

body.dark-mode .result-label {
    color: #b0b0b0;
}

body.dark-mode .result-value {
    color: #e0e0e0;
}

body.dark-mode .password-display {
    background: #0a0a0a;
}

body.dark-mode .upload-area {
    background: #16213e;
    border-color: #0f3460;
}

body.dark-mode .converter-box {
    background: #0f3460;
}

body.dark-mode .converter-box input {
    background: #16213e;
    color: #e0e0e0;
}

body.dark-mode .option-row {
    border-color: #0f3460;
}

body.dark-mode .cidr-table th {
    background: #0f3460;
}

body.dark-mode .cidr-table tr:hover {
    background: #1a1a2e;
}

body.dark-mode .formula {
    background: #0f3460;
    color: #b0b0b0;
}

body.dark-mode .ad-placeholder {
    background: #16213e;
    border-color: #0f3460;
    color: #666;
}

body.dark-mode footer {
    color: #888;
}

body.dark-mode h1 {
    color: #e0e0e0;
}

body.dark-mode .subtitle {
    color: #b0b0b0;
}

body.dark-mode .stat-label {
    color: #b0b0b0;
}

body.dark-mode .output-box {
    background: #0f3460;
    color: #e0e0e0;
    border-color: #1a1a2e;
}

body.dark-mode .file-upload {
    background: #16213e;
    border-color: #0f3460;
}

body.dark-mode .preview-box img {
    border-color: #0f3460;
}

body.dark-mode .palette-color {
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(255,255,255,0.3);
}

body.dark-mode .theme-toggle {
    background: rgba(0,0,0,0.3);
}

body.dark-mode .theme-toggle:hover {
    background: rgba(0,0,0,0.5);
}

/* Animation for theme switch */
body {
    transition: background-color 0.3s, color 0.3s;
}

.tool-box, .tool-card, input, textarea, select, .result-card, .upload-area {
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}
