/* Beast AI Suite - Main Stylesheet */
/* Themed to match beastcreativeagency.com */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700&display=swap');

:root {
    --primary: #FF1198;
    --primary-dark: #E00F88;
    --primary-light: #FF8FCE;
    --secondary: #FF1198;
    --accent: #FF1198;
    --bg-dark: #141414;
    --bg-darker: #0C0C0C;
    --bg-card: #1A1A1A;
    --bg-light: #F2F2FA;
    --text-light: #FFFFFF;
    --text-dark: #0C0C0C;
    --text-muted: #888888;
    --border: #2A2A2A;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-darker);
    color: var(--text-light);
    min-height: 100vh;
    font-weight: 500;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
}

.sidebar-selectors {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.selector-group {
    margin-bottom: 12px;
}

.selector-group:last-child {
    margin-bottom: 0;
}

.selector-group label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.selector-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 0.875rem;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
}

.selector-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.nav-item:hover {
    background: rgba(255, 17, 152, 0.1);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 16px;
}

/* Brand Preview */
.brand-preview {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}

.brand-preview h3 {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    font-weight: 600;
}

.brand-field {
    display: flex;
    margin-bottom: 8px;
}

.brand-field .label {
    color: var(--text-muted);
    font-size: 0.75rem;
    min-width: 50px;
}

.brand-field .value {
    font-size: 0.875rem;
    color: var(--text-light);
}

.brand-colors {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: var(--primary);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}

.dashboard-card.wide {
    grid-column: 1 / -1;
}

.dashboard-card h2 {
    font-size: 1rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Raleway', sans-serif;
}

.action-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 17, 152, 0.3);
}

.action-btn.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
}

.action-btn.secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
    box-shadow: none;
}

.action-icon {
    font-size: 1.2rem;
}

/* Service Status */
.service-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-darker);
}

.service-status-badge.online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* Activity */
.activity-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-type {
    font-size: 1.25rem;
}

.activity-prompt {
    color: var(--text-light);
}

.activity-client {
    background: var(--bg-darker);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Generator Container */
.generator-container {
    position: relative;
}

.generator-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 1rem;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Quick Insert (Character/Product dropdowns) */
.quick-insert {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 20px;
}

/* Checkbox */
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Radio */
.radio-group {
    display: flex;
    gap: 24px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Mode Selector */
.mode-selector {
    margin-bottom: 20px;
}

.mode-selector label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Advanced Options */
.advanced-options {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px;
    background: var(--bg-darker);
}

.advanced-options summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.advanced-options[open] summary {
    margin-bottom: 16px;
    color: var(--primary);
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Raleway', sans-serif;
}

.generate-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 17, 152, 0.4);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Results Container */
.results-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}

.results-container h2 {
    margin-bottom: 16px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.image-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.image-grid img:hover {
    transform: scale(1.02);
    border-color: var(--primary);
}

.image-item {
    position: relative;
}

.image-item .download-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 8px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Raleway', sans-serif;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-item:hover .download-btn {
    opacity: 1;
}

/* Video Preview */
.video-preview {
    background: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
}

.video-preview video {
    width: 100%;
    max-height: 500px;
}

/* Content Type Selector */
.content-type-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.type-btn {
    padding: 12px 20px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Raleway', sans-serif;
}

.type-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.type-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Brand Checks */
.brand-checks {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.check-item {
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.check-item.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.check-item.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* Content Output */
.content-output {
    background: var(--bg-darker);
    border-radius: 4px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.content-variant {
    padding: 16px;
    background: var(--bg-card);
    border-radius: 4px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.content-variant:last-child {
    margin-bottom: 0;
}

.content-variant h4 {
    color: var(--primary);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 12, 12, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.loading-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 8px;
}

.progress-bar {
    width: 200px;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

/* History */
.history-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select {
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-light);
    font-family: 'Raleway', sans-serif;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    transition: border-color 0.2s;
}

.history-item:hover {
    border-color: var(--primary);
}

.history-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.history-type {
    font-size: 1.25rem;
}

.history-prompt {
    flex: 1;
    font-weight: 600;
}

.history-client {
    background: var(--bg-darker);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.history-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.history-item-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.history-item-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 8px 14px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Raleway', sans-serif;
}

.btn-small:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-prompt {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.modal-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.modal-images img {
    width: 100%;
    border-radius: 4px;
}

.modal-content-text {
    background: var(--bg-darker);
    padding: 20px;
    border-radius: 4px;
    line-height: 1.6;
}

/* Image Preview */
.image-preview {
    margin-top: 12px;
}

.image-preview img {
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Utility */
.loading {
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.empty {
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.error {
    color: var(--error);
    text-align: center;
    padding: 40px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        z-index: 100;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }
}
