/* Global Styles - Vibrant AI Theme */
:root {
    --bg-color: #0a0e27;
    --bg-gradient: linear-gradient(135deg, #0a0e27 0%, #1a1b3d 100%);
    --text-color: #e6f1ff;
    --primary-color: #6366f1;
    --secondary-color: #a855f7;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --header-bg: rgba(15, 23, 42, 0.95);
    --card-bg: linear-gradient(135deg, rgba(30, 30, 60, 0.6) 0%, rgba(20, 20, 40, 0.8) 100%);
    --border-color: rgba(99, 102, 241, 0.3);
    --glow-color: rgba(99, 102, 241, 0.5);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Header & Top Menu */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: var(--header-bg);
    border-bottom: 2px solid var(--border-color);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-sizing: border-box;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.logo svg {
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.8));
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

/* Main Content */
main {
    padding-top: 80px;
    padding-left: 24px;
    padding-right: 24px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero {
    margin-top: 60px;
    padding: 40px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%,
            transparent 0deg,
            rgba(99, 102, 241, 0.05) 90deg,
            transparent 180deg,
            rgba(168, 85, 247, 0.05) 270deg,
            transparent 360deg);
    pointer-events: none;
}

h1 {
    margin-bottom: 1rem;
    font-size: 2.8rem;
    letter-spacing: -0.05rem;
    background: linear-gradient(135deg, #fff 0%, #a855f7 50%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.8));
    }
}

p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.hidden {
    display: none !important;
}

/* Loading */
.loader {
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Hero Image */
.hero-image {
    margin-top: 2rem;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(99, 102, 241, 0.3);
    border: 2px solid rgba(99, 102, 241, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(168, 85, 247, 0.5);
}

/* Points Badge */
.points-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Workflow Selection */
.workflow-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.workflow-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.workflow-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.workflow-block {
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.4) 0%, rgba(20, 20, 40, 0.6) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.workflow-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0) 0%, rgba(99, 102, 241, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.workflow-block:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.workflow-block:hover::before {
    opacity: 1;
}

.workflow-block.active {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.4),
        inset 0 0 0 1px rgba(236, 72, 153, 0.5);
}

.workflow-block.active::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.6);
}

.workflow-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.workflow-desc {
    font-size: 0.9rem;
    color: #8b949e;
    line-height: 1.5;
}

/* Image Generation Section */
.generation-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.generation-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.generation-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    align-items: flex-start;
}

.prompt-input {
    flex: 1;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.4) 0%, rgba(20, 20, 40, 0.6) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    min-height: 80px;
}

.prompt-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.prompt-input::placeholder {
    color: #6b7280;
}

.btn-generate {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    white-space: nowrap;
    align-self: stretch;
    min-width: 140px;
}

.generated-image-container {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.4) 0%, rgba(20, 20, 40, 0.6) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6b7280;
}

.image-placeholder svg {
    opacity: 0.5;
}

.image-placeholder p {
    margin: 0;
    font-size: 0.95rem;
}

.generated-image-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}