:root {
    --primary: #0891B2;
    --secondary: #22D3EE;
    --accent: #CFFAFE;
    --background: #0A1518;
    --surface: #102126;
    --surface-hover: #162C33;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --border: rgba(34, 211, 238, 0.2);
    --border-radius: 12px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Category Colors */
    --cat-feat: #10B981;
    --cat-fix: #EF4444;
    --cat-chore: #8B5CF6;
    --cat-docs: #3B82F6;
    --cat-style: #EC4899;
    --cat-refactor: #F59E0B;
    --cat-perf: #059669;
    --cat-test: #6366F1;
    --cat-other: #9CA3AF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    align-items: start;
}

.glass-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent);
    display: flex;
    align-items: center;
}

.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

textarea,
input[type="text"],
input[type="date"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

textarea:focus,
input[type="text"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.1);
}

#commit-input {
    min-height: 250px;
    resize: vertical;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.export-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    flex: 2;
}

.btn.primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn.secondary {
    background: rgba(34, 211, 238, 0.1);
    color: var(--secondary);
    border: 1px solid var(--border);
    flex: 1;
}

.btn.secondary:not(:disabled):hover {
    background: rgba(34, 211, 238, 0.15);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.output-header h2 {
    margin-bottom: 0;
}

.output-container {
    height: 400px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.output-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.output-view.active {
    opacity: 1;
    visibility: visible;
}

#output-markdown {
    font-family: monospace;
    white-space: pre-wrap;
    background: transparent;
    border: none;
    resize: none;
}

.empty-state {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-style: italic;
}

.export-footer {
    display: flex;
    gap: 1rem;
}

/* Generated Changelog Preview Styles */
.changelog-preview {
    font-family: var(--font-family);
}

.changelog-preview h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.changelog-preview h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.changelog-preview ul {
    list-style-type: none;
}

.changelog-preview li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.changelog-preview li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary);
}

.badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 0.5rem;
    background: var(--border);
}

.badge-scope {
    font-weight: normal;
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 900px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .output-container {
        height: 600px;
    }
}