:root {
    --bg-dark: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-blur: 16px;
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.3);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem 1rem;
    overflow-x: hidden;
    position: relative;
}

/* Background Animations */
.circles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0f172a 100%);
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.circle-3 {
    width: 250px;
    height: 250px;
    background: #3b82f6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.2);
    }
}

/* Typography & Layout */
.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    z-index: 10;
    position: relative;
}

.container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 1rem;
}

.lang-selector {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
}

.lang-selector select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    /* Changed from --text-color to --text-main as --text-color is not defined */
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.lang-selector select:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.lang-selector select option {
    background-color: var(--bg-dark);
    /* Changed from --bg-color to --bg-dark as --bg-color is not defined */
    color: var(--text-main);
    /* Changed from --text-color to --text-main as --text-color is not defined */
}

.logo {
    font-size: 3rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

/* Inputs & Controls */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #cbd5e1;
}

.required {
    color: var(--secondary);
}

textarea,
input[type="text"] {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-main);
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

textarea::placeholder {
    color: #64748b;
}

/* Custom Select */
.custom-select {
    position: relative;
}

select {
    width: 100%;
    appearance: none;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    padding-right: 2.5rem;
    color: var(--text-main);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

select option {
    background: var(--bg-dark);
    color: var(--text-main);
}

.custom-select i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1.2rem;
}

/* Tech Tags / Checkboxes */
.tech-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.tech-tag {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-tag input[type="checkbox"] {
    display: none;
}

.tech-tag:hover {
    background: rgba(30, 41, 59, 1);
    border-color: #64748b;
}

.tech-tag.selected {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    color: #c4b5fd;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.custom-tech-input {
    display: flex;
    gap: 0.5rem;
}

.custom-tech-input input {
    padding: 0.6rem 1rem;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary-small {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Output Area */
.hidden {
    display: none !important;
}

.output-panel {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.output-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin: 0;
}

.prompt-container {
    background: #000;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    max-height: 400px;
    overflow-y: auto;
}

.prompt-container::-webkit-scrollbar {
    width: 8px;
}

.prompt-container::-webkit-scrollbar-track {
    background: #000;
    border-radius: 8px;
}

.prompt-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 8px;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Inter', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.helper-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Pulse animation for copy button */
@keyframes copyPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        color: #10b981;
    }

    100% {
        transform: scale(1);
    }
}

.copied {
    animation: copyPulse 0.4s ease;
    border-color: #10b981;
    color: #10b981;
}

/* History Panel */
.history-panel {
    margin-top: 1rem;
}

.history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-item:hover {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
    transform: translateX(5px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.history-idea {
    font-weight: 500;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-empty {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1.5rem 0;
}

/* Responsiveness */
@media (max-width: 900px) {
    .container {
        padding: 1.5rem;
    }

    .lang-selector {
        position: relative;
        margin-top: 1rem;
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .page-wrapper {
        padding: 1rem 0.5rem;
    }

    .grid-inputs {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }
}

/* --- WOW FACTOR ENHANCEMENTS --- */

/* Loading State Animation */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    background-size: 200% 100%;
    animation: loading-bar 2s infinite linear;
    display: none;
    border-radius: 4px 4px 0 0;
}

@keyframes loading-bar {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Prompt Card Glow */
.result-card {
    position: relative;
    overflow: visible !important;
    transition: all 0.5s var(--ease-out);
}

.result-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--primary), #a855f7, var(--primary));
    z-index: -1;
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 12px;
}

.result-card.glow-active::after {
    opacity: 0.6;
    animation: rotate-glow 4s linear infinite;
}

@keyframes rotate-glow {
    0% {
        filter: blur(15px) hue-rotate(0deg);
    }

    100% {
        filter: blur(15px) hue-rotate(360deg);
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s var(--ease-out);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* SEO FAQ Section */
.seo-faq {
    margin-top: 4rem;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.seo-faq h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-item h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}