:root {
    /* Light mode colors - darker theme */
    --bg-primary: linear-gradient(
        135deg,
        rgba(111, 232, 221, 1) 0%,
        rgba(163, 115, 235, 1) 100%
    );
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #d1d5db;
    --bg-accent: #9ca3af;
    --text-primary: #000000;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-primary: #d1d5db;
    --border-secondary: #e5e7eb;
    --accent-primary: #4f46e5;
    --accent-secondary: #6366f1;
    --success: #059669;
    --error: #dc2626;
    --info: #2563eb;
    --shadow: rgba(0, 0, 0, 0.15);
    --shadow-hover: rgba(0, 0, 0, 0.25);

    /* Icon colors - darker */
    --feature-bg: #065f46;
    --feature-color: #10b981;
    --update-bg: #1e3a8a;
    --update-color: #3b82f6;
    --fix-bg: #991b1b;
    --fix-color: #ef4444;
    --performance-bg: #92400e;
    --performance-color: #f59e0b;
    --security-bg: #581c87;
    --security-color: #8b5cf6;
    --development-bg: #86198f;
    --development-color: #d946ef;
    --regression-bg: #dc2626;
    --regression-color: #fef2f2;
    --compatibility-bg: #0369a1;
    --compatibility-color: #bfdbfe;
}

body.dark-mode {
    /* Dark mode colors - darker theme */
    --bg-primary: linear-gradient(
        135deg,
        rgba(111, 232, 221, 1) 0%,
        rgba(163, 115, 235, 1) 100%
    );
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-accent: #475569;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-tertiary: #6b7280;
    --border-primary: #334155;
    --border-secondary: #1e293b;
    --accent-primary: #7c3aed;
    --accent-secondary: #8b5cf6;
    --success: #10b981;
    --error: #ef4444;
    --info: #3b82f6;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);

    /* Dark mode icon colors - darker */
    --feature-bg: #064e3b;
    --feature-color: #34d399;
    --update-bg: #1e40af;
    --update-color: #60a5fa;
    --fix-bg: #7f1d1d;
    --fix-color: #f87171;
    --performance-bg: #92400e;
    --performance-color: #fbbf24;
    --security-bg: #581c87;
    --security-color: #a78bfa;
    --development-bg: #86198f;
    --development-color: #d946ef;
    --regression-bg: #991b1b;
    --regression-color: #fca5a5;
    --compatibility-bg: #1e40af;
    --compatibility-color: #93c5fd;
}

.container {
    padding: 2em;
    background-color: var(--bg-secondary);

    color: var(--text-secondary);
    background-color: var(--bg-primary);

    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-primary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.dark-mode-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 50px;
    height: 24px;
    background-color: var(--border-primary);
    border-radius: 20px;
    position: relative;
    transition: background-color 0.3s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow);
}

.dark-mode-toggle input:checked + .toggle-slider {
    background-color: var(--accent-primary);
}

.dark-mode-toggle input:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.export-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.input-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.input-section h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-primary);
}

.input-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid var(--border-primary);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    padding: 16px;
    border: 2px solid var(--border-primary);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    min-height: 200px;
    resize: vertical;
    font-family: var(--font-monospace);
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.generate-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    align-self: flex-start;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.changelog-container-wrapper {
    background: var(--bg-primary);
    padding: 4em;
    transition: background-color 0.3s ease;
}

.changelog-container {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-primary);
    overflow: hidden;
    outline: 10px solid rgba(255, 255, 255, 0.5);

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    min-height: 600px;
}

.left-column {
    padding: 30px;
    border-radius: 12px;
    height: fit-content;
    transition: background 0.3s ease;
}

.changelog-title {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
}

.release-info {
    margin-bottom: 40px;
}

.release-info > div {
    margin-bottom: 25px;
}

.release-info p {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

#version-number {
    font-size: 48px;
    font-weight: 700;
    font-family: "Mozilla Text", monospace;
    color: var(--text-primary);
}

#release-description {
    font-size: 14px;
    line-height: 1.5;
}

.legend h3 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

body.dark-mode .legend-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

body.dark-mode .legend-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.icon {
    font-size: 14px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.feature-icon {
    background: var(--feature-bg);
    color: var(--feature-color);
}

.update-icon {
    background: var(--update-bg);
    color: var(--update-color);
}

.fix-icon {
    background: var(--fix-bg);
    color: var(--fix-color);
}

.performance-icon {
    background: var(--performance-bg);
    color: var(--performance-color);
}

.security-icon {
    background: var(--security-bg);
    color: var(--security-color);
}

.development-icon {
    background: var(--development-bg);
    color: var(--development-color);
}

.regression-icon {
    background: var(--regression-bg);
    color: var(--regression-color);
}

.compatibility-icon {
    background: var(--compatibility-bg);
    color: var(--compatibility-color);
}

.label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.right-column {
    padding: 30px;
}
.dark-mode .right-column {
    background: rgba(0, 0, 0, 0.5);
}

.changelog-list h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-primary);
}

#changelog-items {
    list-style: none;
}

.changelog-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 0.667em 0;
    border-bottom: 1px solid var(--border-secondary);
    transition: background-color 0.2s;
}

.changelog-item:hover {
    background-color: var(--bg-tertiary);
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
    border-radius: 6px;
}

.changelog-item:last-child {
    border-bottom: none;
}

.changelog-item .icon {
    margin-top: 2px;
    flex-shrink: 0;
}

.changelog-content {
    flex: 1;
}

@media (max-width: 768px) {
    .changelog-container-wrapper {
        padding: 10px;
    }

    .changelog-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .changelog-title {
        font-size: 2rem;
    }

    .header {
        justify-content: center;
    }

    .container {
        padding: 15px;
        margin: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .input-section {
        padding: 20px;
    }
}

@media print {
    .export-btn,
    .generate-btn,
    .input-section {
        display: none;
    }

    body {
        background-color: white;
    }

    .container {
        box-shadow: none;
        max-width: none;
        margin: 0;
        padding: 0;
    }
}
