/* CSS Variables */
:root {
    --bg-dark: #0A0F1A;
    --bg-panel: #111827;
    --bg-panel-hover: #1f2937;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary: #3B82F6;
    --primary-hover: #2563eb;
    --secondary: #60A5FA;
    --accent: #F59E0B;
    --border-radius: 12px;
    --transition: 250ms ease;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    --twitter: #1DA1F2;
    --linkedin: #0A66C2;
    --instagram: #E1306C;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

h1, h2, h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.app-header p {
    color: var(--text-secondary);
}

.split-pane {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    flex: 1;
}

.pane {
    background: var(--bg-panel);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

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

.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input, select {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

input::placeholder {
    color: rgba(156, 163, 175, 0.5);
}

/* Checkbox Toggle */
.checkbox-group {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.toggle-label {
    font-size: 0.9rem;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: white;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    grid-column: 1 / -1;
    margin-top: 1rem;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-message {
    grid-column: 1 / -1;
    color: #ef4444;
    font-size: 0.875rem;
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
}

.hidden {
    display: none;
}

/* Output Pane */
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.status-badge {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.bio-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.bio-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.bio-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.platform-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.twitter-icon { color: var(--twitter); }
.linkedin-icon { color: var(--linkedin); }
.instagram-icon { color: var(--instagram); }

.card-header h3 {
    margin: 0;
    font-size: 0.9rem;
    flex: 1;
    font-weight: 500;
    color: var(--text-secondary);
}

.btn-copy {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
    font-weight: 500;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-copy.copied {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.card-body {
    padding: 0;
}

.bio-textarea {
    width: 100%;
    min-height: 100px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 1.25rem;
    resize: vertical;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
}

.bio-textarea:focus {
    outline: none;
}

.instagram-format {
    white-space: pre-wrap;
    min-height: 140px;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    text-align: right;
    background: rgba(255, 255, 255, 0.01);
}

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

.char-count.warning {
    color: var(--accent);
}

.char-count.danger {
    color: #ef4444;
}

@media (max-width: 900px) {
    .split-pane {
        grid-template-columns: 1fr;
    }
}
