:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --secondary-hover: #db2777;
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(15, 23, 42, 0.7);
    --input-border: rgba(148, 163, 184, 0.2);
    --scrollbar-track: rgba(15, 23, 42, 0.5);
    --scrollbar-thumb: rgba(148, 163, 184, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

/* Dynamic background animations */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    animation: backgroundPulse 12s ease-in-out infinite alternate;
}

@keyframes backgroundPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

.container {
    width: 100%;
    max-width: 1300px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

/* Typography styles */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--text-muted); }
.mx-2 { margin: 0 0.5rem; }

header {
    text-align: center;
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

header p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

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

@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 1.5rem;
    }
    header h1 {
        font-size: 2.2rem;
    }
}

.panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

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

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-header h2 i {
    color: var(--primary);
}

.actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Textarea Customization */
textarea {
    width: 100%;
    height: 450px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 1.25rem;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: 'Fira Code', 'Consolas', monospace; /* Monospace for code/content */
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2), 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: rgba(15, 23, 42, 0.8);
}

textarea::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

textarea::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
textarea::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 0 12px 12px 0;
}
textarea::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
    border: 3px solid var(--scrollbar-track);
}
textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* Button Styles */
.controls {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex: 1;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #f472b6);
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.35);
}
.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--secondary-hover), var(--secondary));
}

.btn-icon {
    flex: none;
    padding: 0.5rem;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    box-shadow: none;
    border: 1px solid var(--glass-border);
}
.btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Status Notifications */
.status-msg {
    font-size: 0.85rem;
    font-weight: 500;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.status-msg.show {
    opacity: 1;
    transform: translateX(0);
}

footer {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 1rem;
}
