:root {
    --bg-dark: #0a0a0f;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --glow-1: rgba(99, 102, 241, 0.15);
    --glow-2: rgba(168, 85, 247, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
}

.glow-1 {
    top: -100px;
    left: -100px;
    background: var(--glow-1);
}

.glow-2 {
    bottom: -100px;
    right: -100px;
    background: var(--glow-2);
}

.dashboard-container {
    width: 100%;
    max-width: 800px;
    z-index: 1;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

.header-titles {
    flex-grow: 1;
}

.settings-btn {
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

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

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Progress Bar */
.progress-bar-container {
    margin-top: 2rem;
    position: relative;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.progress-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    width: 100%;
    background: var(--card-border);
    border-radius: 2px;
    z-index: 1;
}

.progress-fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    width: 0%;
    background: var(--primary-color);
    border-radius: 2px;
    z-index: 2;
    transition: width 0.5s ease;
}

.progress-steps {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: space-between;
}

.progress-step {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 4px solid var(--card-border);
    transition: var(--transition);
}

.progress-step.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

/* Step Cards */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.step-card.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.step-header h2 {
    font-size: 1.25rem;
    font-weight: 500;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--card-border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.upload-zone:hover i {
    color: var(--primary-color);
}

.upload-zone h3 {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.upload-zone p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 1rem 1.5rem;
    border-radius: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-info i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--danger);
}

/* Caption Area */
.caption-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.btn-ai {
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-ai:hover {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

.btn-ai i {
    font-size: 1.1rem;
}

.textarea-wrapper {
    position: relative;
}

textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.char-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Platforms Grid */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.platform-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.platform-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.platform-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.platform-header i {
    font-size: 1.5rem;
}

.platform-card[data-platform="facebook"] i { color: #1877F2; }
.platform-card[data-platform="instagram"] i { color: #E1306C; }
.platform-card[data-platform="youtube"] i { color: #FF0000; }
.platform-card[data-platform="tiktok"] i { color: #00f2fe; }

.platform-header span {
    font-weight: 500;
    flex-grow: 1;
}

/* Review & Publish */
.summary-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    margin-bottom: 1rem;
}

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

.summary-label {
    width: 120px;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.summary-value {
    flex-grow: 1;
    word-break: break-word;
}

.summary-platforms {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.platform-tag {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Status Bar */
.status-bar {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--success);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-bar i.ph-check-circle {
    font-size: 2rem;
    color: var(--success);
}

.status-content h4 {
    margin-bottom: 0.2rem;
}

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

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modals & Overlays */
.modal-overlay, .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #111116;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

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

.input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-footer {
    margin-top: 2rem;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-overlay {
    flex-direction: column;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Status Bar Error State */
.status-bar.error {
    border-color: var(--danger);
}

.status-bar.error i.ph-warning-circle {
    font-size: 2rem;
    color: var(--danger);
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    .platforms-grid {
        grid-template-columns: 1fr;
    }
    .summary-item {
        flex-direction: column;
    }
    .summary-label {
        margin-bottom: 0.25rem;
    }
}

/* Auth Overlay */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.auth-card {
    background: #111116;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.auth-card h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}
