/* WebIgniter Studio - Master CSS for All Pages */

:root {
    --primary-bg: #1a1a1a;
    --secondary-bg: #2a2a2a;
    --charcoal: #2d2d2d;
    --medium-gray: #404040;
    --light-gray: #666666;
    --accent-blue: #4a9eff;
    --accent-green: #00c851;
    --accent-orange: #ff8800;
    --accent-red: #ff4444;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #cccccc;
    --accent-bg: #2a2a2a;
}

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

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

/* ===== DASHBOARD STYLES ===== */
.dashboard-container {
    min-height: 100vh;
}

.dashboard-header {
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--medium-gray);
    width: 100%;
}

.dashboard-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 0.8;
}

.header-left .studio {
    color: var(--accent-blue);
}

.user-welcome {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 0.8;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.storage-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.storage-text {
    font-size: 12px;
    color: var(--text-muted);
}

.storage-bar {
    width: 100px;
    height: 6px;
    background: var(--medium-gray);
    border-radius: 3px;
    overflow: hidden;
}

.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-orange));
    transition: width 0.3s ease;
}

.logout-btn {
    padding: 8px 16px;
    background: var(--accent-red);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.logout-btn:hover {
    background: #e33939;
}

.dashboard-main {
    padding: 0px 30px 30px 30px;
    max-width: 1200px;
    margin: -10px auto 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--secondary-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 32px;
    opacity: 0.8;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-blue);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Tools Section */
.tools-section,
.quick-access-section {
    margin-bottom: 40px;
}

.tools-section h2,
.quick-access-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--secondary-bg);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tool-card.coming-soon {
    opacity: 0.7;
}

.tool-card.placeholder {
    border-style: dashed;
    opacity: 0.6;
}

.tool-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.tool-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.tool-content p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
}

.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.feature-tag {
    background: var(--charcoal);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tool-actions {
    display: flex;
    gap: 10px;
}

.tool-btn {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    flex: 1;
}

.tool-btn.primary {
    background: var(--accent-blue);
    color: white;
}

.tool-btn.primary:hover {
    background: #3a8bdf;
}

.tool-btn.secondary {
    background: var(--charcoal);
    color: var(--text-secondary);
    border: 1px solid var(--medium-gray);
}

.tool-btn.secondary:hover {
    background: var(--medium-gray);
    color: var(--text-primary);
}

.tool-btn.disabled {
    background: var(--medium-gray);
    color: var(--text-muted);
    cursor: not-allowed;
}

.coming-soon-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-orange);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Quick Access */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-access-card {
    background: var(--secondary-bg);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-access-card:hover {
    background: var(--charcoal);
    transform: translateY(-1px);
}

.quick-icon {
    font-size: 24px;
    opacity: 0.8;
}

.quick-content h3 {
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.quick-content p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== TOOL PAGES STYLES (Studio, Product Editor, Character Tool) ===== */

/* Tool Grid Layout */
.tool-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

.tool-panel {
    background: rgba(45, 45, 45, 0.4);
    border-radius: 20px;
    border: 1px solid var(--medium-gray);
    padding: 20px;
}

.panel-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Branding */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.logo-section {
    flex: 1;
}

.logo-section h1 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-blue);
    margin-bottom: 8px;
    letter-spacing: -2px;
}

.logo-section .studio {
    font-weight: 400;
    opacity: 1.0;
}

.tagline {
    font-size: 1.1rem;
    color: var(--light-gray);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tool-header {
    background: rgba(45, 45, 45, 0.6);
    border: 1px solid var(--medium-gray);
    border-radius: 16px;
    padding: 30px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.tool-header h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--light-gray);
    font-weight: 400;
}

/* Main Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

/* Left Panel */
.left-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-section h2 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--text-primary);
    text-align: center;
    font-weight: 600;
}

/* Upload Area */
.product-upload-area {
    width: 320px;
    height: 420px;
    background: var(--charcoal);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 35px;
    border: 3px dashed var(--accent-blue);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-upload-area:hover,
.product-upload-area.drag-over {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(74, 158, 255, 0.4);
    border-color: var(--accent-blue);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.upload-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    text-align: center;
}

.upload-subtitle {
    font-size: 0.9rem;
    color: var(--light-gray);
    text-align: center;
}

/* Product Display */
.product-display {
    width: 320px;
    text-align: center;
    margin-bottom: 35px;
}

.product-image,
.generated-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Character Images Display */
.character-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 320px;
}

.character-image-container {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--accent-blue);
}

.character-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-character-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    color: #333;
}

/* Action Button */
.action-btn {
    width: 280px;
    padding: 15px 25px;
    background: var(--accent-blue);
    color: var(--text-primary);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(74, 158, 255, 0.3);
}

.action-btn:hover {
    background: #3a8bdf;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.4);
}

.action-btn.disabled {
    background: #444;
    color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Product Info */
.product-info .info-text {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: center;
}

.product-info .info-subtext {
    margin: 0;
    font-size: 0.8rem;
    color: var(--light-gray);
    text-align: center;
}

/* Right Panel */
.right-panel {
    padding: 20px;
    background: rgba(45, 45, 45, 0.4);
    border-radius: 20px;
    border: 1px solid var(--medium-gray);
    backdrop-filter: blur(10px);
}

/* Controls */
.controls-section {
    margin-bottom: 35px;
}

.control-group {
    margin-bottom: 25px;
}

.control-group label {
    display: block;
    font-size: 1rem;
    color: var(--accent-blue);
    margin-bottom: 8px;
    font-weight: 600;
}

.control-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--charcoal);
    color: var(--text-primary);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.control-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.control-select option {
    background: var(--charcoal);
    color: var(--text-primary);
}

/* Scene Section */
.scene-section {
    margin-bottom: 35px;
}

.scene-section h3,
.ideas-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.prompt-mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 10px 15px;
    background: var(--medium-gray);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: var(--accent-blue);
}

.mode-btn:hover {
    background: var(--accent-blue);
}

.simple-input,
.scene-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--charcoal);
    color: var(--text-primary);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    resize: vertical;
    min-height: 80px;
}

.simple-input:focus,
.scene-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.generate-prompt-btn,
.refine-prompt-btn {
    width: 100%;
    padding: 12px 16px;
    background: var(--accent-blue);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-prompt-btn:hover,
.refine-prompt-btn:hover {
    background: #3a8bdf;
}

/* Ideas Section */
.ideas-section {
    margin-bottom: 35px;
}

.ideas-subsection {
    margin-bottom: 25px;
}

.ideas-subsection h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--accent-blue);
    font-weight: 600;
}

.description-text {
    font-size: 0.9rem;
    color: var(--light-gray);
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.description-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--charcoal);
    color: var(--text-primary);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 0.9rem;
}

.description-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.upload-area {
    border: 2px dashed var(--medium-gray);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.1);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ideas-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--medium-gray);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ideas-btn:hover {
    background: var(--accent-blue);
}

.or-divider {
    text-align: center;
    color: var(--text-muted);
    margin: 20px 0;
    font-size: 0.9rem;
}

/* Generated Content */
.generated-prompt-preview {
    background: rgba(45, 45, 45, 0.6);
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.preview-label {
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 8px;
}

.preview-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.use-prompt-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--accent-blue);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.use-prompt-btn:hover {
    background: #3a8bdf;
}

/* Result Section */
.result-section {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: rgba(45, 45, 45, 0.4);
    border-radius: 20px;
    border: 1px solid var(--medium-gray);
}

.result-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn,
.edit-btn,
.secondary-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.download-btn {
    background: var(--accent-blue);
    color: var(--text-primary);
}

.download-btn:hover {
    background: #3a8bdf;
}

.edit-btn {
    background: var(--medium-gray);
    color: var(--text-primary);
}

.edit-btn:hover {
    background: var(--accent-blue);
}

.secondary-btn {
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
}

.secondary-btn:hover {
    background: var(--accent-blue);
    color: var(--text-primary);
}

/* History Section */
.history-section {
    margin-top: 40px;
    padding: 30px;
    background: rgba(45, 45, 45, 0.4);
    border-radius: 20px;
    border: 1px solid var(--medium-gray);
}

.history-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.history-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.clear-history-btn,
.toggle-history-btn {
    padding: 8px 16px;
    background: var(--medium-gray);
    color: var(--text-primary);
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-history-btn:hover,
.toggle-history-btn:hover {
    background: var(--accent-blue);
}

.history-bar {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.history-item {
    flex-shrink: 0;
    width: 150px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--medium-gray);
}

.history-item:hover {
    border-color: var(--accent-blue);
    transform: scale(1.05);
}

.history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--medium-gray);
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== MODAL STYLES ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--secondary-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--medium-gray);
}

.modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 25px;
}

/* API Key Modal Styles */
.api-key-section {
    margin-bottom: 20px;
}

.api-key-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
}

.api-key-section input {
    width: 100%;
    padding: 10px 12px;
    background: var(--charcoal);
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.api-key-section small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.api-key-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.save-keys-btn {
    flex: 1;
    padding: 10px 20px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}

.clear-keys-btn {
    padding: 10px 20px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}

.api-key-help {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--medium-gray);
}

.api-key-help h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.api-key-help a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
}

.api-key-help a:hover {
    text-decoration: underline;
}

/* ===== LOGIN PAGE STYLES ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--secondary-bg);
    border: 1px solid var(--medium-gray);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 8px;
}

.login-header .studio {
    color: var(--text-primary);
}

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

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px 16px;
    background: var(--charcoal);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.login-btn {
    padding: 12px 16px;
    background: var(--accent-blue);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    background: #3a8bdf;
    transform: translateY(-1px);
}

.error-message {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

/* ===== LIBRARY PAGE STYLES ===== */
.library-container {
    min-height: 100vh;
    padding: 20px;
}

.library-header {
    background: var(--secondary-bg);
    border: 1px solid var(--medium-gray);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    text-align: center;
}

.library-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.library-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.library-filter {
    padding: 10px 16px;
    background: var(--charcoal);
    color: var(--text-primary);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.library-filter:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.library-item {
    background: var(--secondary-bg);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.library-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.library-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.library-item-info {
    padding: 15px;
}

.library-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.library-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-upload-area {
        width: 100%;
        max-width: 320px;
    }
    
    .action-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .right-panel {
        padding: 15px;
    }
    
    .logo-section h1 {
        font-size: 2.5rem;
    }
    
    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .dashboard-header-content {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 20px;
    }
    
    .header-right {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .dashboard-main {
        padding: 20px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-access-grid {
        grid-template-columns: 1fr;
    }
    
    .library-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 15px;
    }

    .library-controls {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== LIBRARY STYLES ===== */
.library-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--secondary-bg);
    border-radius: 12px;
    border: 1px solid var(--medium-gray);
}

.library-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-blue);
}

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

.library-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.library-filters select {
    background: var(--charcoal);
    border: 1px solid var(--medium-gray);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.library-filters input {
    background: var(--charcoal);
    border: 1px solid var(--medium-gray);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    width: 200px;
}

.library-filters button {
    background: var(--medium-gray);
    border: none;
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.library-filters button:hover {
    background: var(--accent-blue);
}

/* Library Grid - Force exactly 3 columns */
.library-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
    max-width: 100%;
}

.library-item {
    background: var(--secondary-bg);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.library-item:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.15);
}

.item-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.library-item:hover .item-image img {
    transform: scale(1.05);
}

.influencer-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(74, 158, 255, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px 15px 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.library-item:hover .item-overlay {
    opacity: 1;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    background: var(--accent-blue);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.action-btn.download-btn {
    background: var(--accent-green);
}

.action-btn.delete-btn {
    background: var(--accent-red);
}

.action-btn.use-btn {
    background: var(--accent-orange);
}

.action-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.item-info {
    padding: 15px;
}

.item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 14px;
}

.item-details {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.item-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--medium-gray);
}

.empty-library {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.empty-library h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .library-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .library-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .library-controls {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .library-stats {
        justify-content: space-around;
    }
}

/* ===== INFLUENCER CREATOR STYLES ===== */
.step-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--charcoal);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.step-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
}

.step-description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.progress-tracker {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--secondary-bg);
    border-radius: 12px;
    position: relative;
}

.progress-tracker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--medium-gray);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--medium-gray);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.progress-step.active .progress-circle {
    background: var(--accent-blue);
    color: white;
}

.progress-step.completed .progress-circle {
    background: var(--accent-green);
    color: white;
}

.progress-step span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-step.active span {
    color: var(--accent-blue);
}

.progress-step.completed span {
    color: var(--accent-green);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.preview-image-container {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.preview-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(255, 68, 68, 0.9);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-image-btn:hover {
    background: var(--accent-red);
}

.control-input {
    width: 100%;
    padding: 12px;
    background: var(--charcoal);
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.control-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.control-textarea {
    width: 100%;
    padding: 12px;
    background: var(--charcoal);
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.control-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.character-card {
    background: var(--secondary-bg);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
}

.character-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.character-preview-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
}

.character-info h5 {
    margin: 0 0 8px 0;
    color: var(--accent-blue);
    font-size: 16px;
}

.character-info p {
    margin: 0 0 10px 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.character-stats {
    font-size: 12px;
    color: var(--text-muted);
}

.creation-result {
    text-align: center;
    padding: 40px 20px;
    background: var(--secondary-bg);
    border: 1px solid var(--accent-green);
    border-radius: 12px;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.creation-result h4 {
    color: var(--accent-green);
    margin-bottom: 10px;
}

.creation-result p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.upload-area.drag-over {
    border-color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.1);
}

/* ===== SCENE GENERATOR SPECIFIC STYLES ===== */
.quick-templates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.template-btn {
    padding: 8px 12px;
    background: var(--charcoal);
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.template-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(74, 158, 255, 0.05);
}

.suggestions-area {
    margin-top: 20px;
    padding: 15px;
    background: var(--charcoal);
    border-radius: 8px;
    border: 1px solid var(--medium-gray);
}

.suggestions-area h4 {
    color: var(--accent-blue);
    margin-bottom: 15px;
    font-size: 16px;
}

.suggestion-item {
    background: var(--secondary-bg);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--medium-gray);
}

.suggestion-item:last-child {
    margin-bottom: 0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #3a8bdf;
}