/* ===== CSS Variables ===== */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --dark: #2D3436;
    --light: #F8F9FA;
    --gray: #636E72;
    --gray-light: #DFE6E9;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    
    --gradient: linear-gradient(135deg, #6C5CE7 0%, #a367dc 100%);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Navigation ===== */
.navbar {
    background: white;
    padding: 16px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 800;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    color: var(--dark);
}

.highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ===== Buttons ===== */
.btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-small {
    padding: 6px 16px;
    font-size: 14px;
}

.btn-full {
    width: 100%;
    text-align: center;
}

/* ===== Hero Section ===== */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* ===== Mockup ===== */
.mockup {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.mockup-header {
    background: var(--dark);
    color: white;
    padding: 12px 20px;
    font-weight: 600;
}

.mockup-content {
    padding: 20px;
}

.mockup-line {
    height: 12px;
    background: var(--gray-light);
    border-radius: 6px;
    margin-bottom: 12px;
}

.mockup-line.short { width: 40%; }
.mockup-line.medium { width: 60%; }
.mockup-line.long { width: 100%; }

.mockup-tags {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.tag {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

/* ===== Features ===== */
.features {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray);
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 80px 0;
    background: var(--gradient);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 40px;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ===== Dashboard ===== */
.dashboard-section {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.generations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.generation-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.gen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.platform-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.platform-badge.tiktok { background: #000; }
.platform-badge.instagram { background: #E4405F; }
.platform-badge.youtube { background: #FF0000; }

.date {
    font-size: 12px;
    color: var(--gray);
}

.gen-preview {
    margin: 12px 0;
    color: var(--gray);
    font-size: 14px;
}

.gen-actions {
    display: flex;
    gap: 8px;
}

/* ===== Generate Page ===== */
.generate-section {
    padding: 60px 0;
}

.generate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.form-card, .result-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group select,
.form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: border-color 0.3s;
}

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

.form-group small {
    display: block;
    color: var(--gray);
    margin-top: 4px;
    font-size: 12px;
}

.platform-selector {
    display: flex;
    gap: 16px;
}

.platform-option {
    flex: 1;
}

.platform-option input[type="radio"] {
    display: none;
}

.platform-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.platform-option input:checked + label {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.1);
}

.platform-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

/* ===== Result Card ===== */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.result-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-light);
}

.result-section:last-of-type {
    border-bottom: none;
}

.result-section h3 {
    margin-bottom: 12px;
    color: var(--primary);
}

.result-content {
    background: var(--light);
    padding: 16px;
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
    font-family: monospace;
    margin-bottom: 12px;
}

.hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ===== Loading ===== */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.hidden {
    display: none;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

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

.empty-state h2 {
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 30px;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    margin-top: 12px;
    opacity: 0.8;
}

.footer-links h4 {
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 40px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .generate-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ===== Admin Panel ===== */
.admin-section {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

.admin-header {
    margin-bottom: 40px;
}

.admin-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.admin-header p {
    color: var(--gray);
    font-size: 18px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.admin-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.admin-card-header {
    margin-bottom: 24px;
}

.admin-card-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.admin-card-header p {
    color: var(--gray);
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-light);
}

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 600;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--light);
    border-radius: var(--radius-sm);
}

.stat-key {
    font-weight: 600;
    color: var(--gray);
    font-size: 14px;
}

.stat-value {
    font-weight: 600;
    font-size: 14px;
}

.nav-link-icon {
    text-decoration: none;
    font-size: 20px;
    transition: transform 0.2s;
    line-height: 1;
}

.nav-link-icon:hover {
    transform: scale(1.2);
}

.active {
    color: var(--primary) !important;
    font-weight: 700;
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}
