:root {
    --bg-dark: #0f1219;
    --bg-panel: #1a1d27;
    --bg-button: #252a36;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --border-color: #374151;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --gradient-btn: linear-gradient(135deg, #60a5fa, #a78bfa);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-panel);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

nav a:hover, nav a.active {
    color: var(--text-primary);
}

nav a.active {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.25rem;
}

.auth-buttons button {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.badge-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.badge {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.workspace {
    display: flex;
    gap: 1.5rem;
    height: 500px;
}

.panel {
    flex: 1;
    background-color: var(--bg-panel);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.panel-header h3 {
    font-size: 1rem;
    font-weight: 500;
}

.word-count {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

textarea {
    flex: 1;
    background-color: transparent;
    border: none;
    color: var(--text-primary);
    padding: 1rem;
    resize: none;
    font-size: 0.95rem;
    line-height: 1.5;
    outline: none;
}

.output-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.panel-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0,0,0,0.2);
}

.right-footer {
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-icon, .btn-action, .dropdown {
    background-color: var(--bg-button);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.btn-icon:hover, .btn-action:hover {
    background-color: #374151;
    color: var(--text-primary);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 140px;
    padding-top: 3.5rem;
}

.btn-primary {
    background: var(--gradient-btn);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.2s;
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
}

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

.btn-primary i {
    font-size: 1.5rem;
}

.modes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mode-btn {
    background-color: var(--bg-panel);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.mode-btn:hover {
    background-color: var(--bg-button);
}

.mode-btn.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border-color: var(--accent);
}

.features-bar {
    margin-top: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    background-color: var(--bg-panel);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.feature-item i {
    color: var(--accent);
}

.info-footer {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}

/* Loader */
.loader {
    display: none;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Auth Pages Styles */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-dark);
}

.auth-container {
    background-color: var(--bg-panel);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.auth-logo {
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--accent);
}

.auth-btn {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.5rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--accent);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.auth-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
