:root {
    --primary: #00B894;
    --secondary: #55EFC4;
    --accent: #FDCB6E;
    --background: #0A1F1C;
    --glass-bg: rgba(10, 31, 28, 0.65);
    --glass-border: rgba(85, 239, 196, 0.2);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --danger: #ff7675;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 15% 15%, rgba(0, 184, 148, 0.1), transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(253, 203, 110, 0.05), transparent 40%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 1rem;
}

header h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

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

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

.panel {
    display: flex;
    flex-direction: column;
}

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.25rem;
    color: var(--secondary);
    font-weight: 600;
}

h3 {
    font-size: 1rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #e2e8f0;
    padding: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: none;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 184, 148, 0.2);
}

#diff-input {
    height: 400px;
    white-space: pre;
    overflow-x: auto;
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    appearance: none;
    cursor: pointer;
}

select:focus {
    border-color: var(--primary);
}

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

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.primary-btn {
    background: var(--primary);
    color: var(--background);
}

.primary-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.outline-btn:hover {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.05);
}

/* Output Area */
.output-container {
    height: 300px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
    width: 80%;
}

#commit-output {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 1.5rem;
    font-size: 1rem;
}

#commit-output:focus {
    box-shadow: none;
}

.analysis-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* History */
.history-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 1rem;
    padding-right: 0.5rem;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.history-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.history-item:hover {
    border-color: var(--primary);
    background: rgba(0, 184, 148, 0.05);
}

.empty-history {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem 0;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    animation: fadeInOut 2.5s ease forwards;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        bottom: 1rem;
    }

    10% {
        opacity: 1;
        bottom: 2rem;
    }

    90% {
        opacity: 1;
        bottom: 2rem;
    }

    100% {
        opacity: 0;
        bottom: 1rem;
    }
}

@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }

    #diff-input {
        height: 300px;
    }
}