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

:root {
    --primary-color: #f7df1e;
    --primary-dark: #c9b617;
    --secondary-color: #323330;
    --bg-color: #1a1a2e;
    --surface-color: #16213e;
    --surface-light: #1f2b4d;
    --text-color: #e8e8e8;
    --text-muted: #a0a0a0;
    --success-color: #4caf50;
    --error-color: #f44336;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -1px;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    background: var(--surface-color);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Editor Container */
.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
    min-height: 400px;
}

.editor-panel {
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

textarea {
    flex: 1;
    width: 100%;
    padding: 16px;
    border: none;
    background: var(--surface-color);
    color: var(--text-color);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
}

textarea::placeholder {
    color: var(--text-muted);
}

textarea:focus {
    background: var(--surface-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon {
    font-size: 1.1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 223, 30, 0.3);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-small:hover {
    background: var(--surface-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Actions */
.actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.notification.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(20px);
}

.notification.success {
    background: var(--success-color);
    color: white;
}

.notification.error {
    background: var(--error-color);
    color: white;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .logo-img {
        width: 36px;
        height: 36px;
    }

    .tagline {
        font-size: 1rem;
    }

    .stats-bar {
        gap: 15px;
        padding: 12px 15px;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-value {
        font-size: 0.95rem;
    }

    .editor-container {
        grid-template-columns: 1fr;
        min-height: 600px;
    }

    .editor-panel {
        min-height: 280px;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .logo-img {
        width: 32px;
        height: 32px;
    }

    .stats-bar {
        flex-direction: column;
        align-items: center;
    }

    .stat {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .stat:last-child {
        border-bottom: none;
    }

    textarea {
        font-size: 13px;
        padding: 12px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.editor-panel {
    animation: fadeIn 0.5s ease forwards;
}

.editor-panel:nth-child(2) {
    animation-delay: 0.1s;
}
