/* ===================================
   CI9 - CapCut-Inspired Design System
   =================================== */

:root {
    /* CapCut Color Palette */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.6);

    --accent-purple: #9333ea;
    --accent-magenta: #ec4899;
    --accent-blue: #3b82f6;

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #999999;

    --border-color: rgba(147, 51, 234, 0.2);
    --border-focus: rgba(147, 51, 234, 0.8);

    --gradient-primary: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
    --gradient-hover: linear-gradient(135deg, #a855f7 0%, #f472b6 100%);
}

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

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

/* Animated Background with Moving Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(147, 51, 234, 0.03) 0%,
            rgba(236, 72, 153, 0.05) 25%,
            rgba(59, 130, 246, 0.03) 50%,
            rgba(147, 51, 234, 0.05) 75%,
            rgba(236, 72, 153, 0.03) 100%);
    background-size: 400% 400%;
    z-index: -1;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Main Container with subtle parallax */
.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Parallax effect for header */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease-out;
}

/* Parallax effect for response (moves slower) */
.response-area {
    transition: transform 0.3s ease-out;
}

/* Logo (left side of header) with gradient shift animation */
.logo {
    font-size: 1.8rem;
    font-weight: 300;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 50%, #9333ea 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.05em;
    margin: 0;
    line-height: 1.4;
    animation: logoGradientShift 15s ease infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

@keyframes logoGradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Suggestion Tags (right side of header) */
.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.suggestion-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-tag:hover {
    background: rgba(147, 51, 234, 0.2);
    border-color: var(--border-focus);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Response Area - matches input width */
.response-area {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto 0;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    text-align: center;
    /* Center error messages */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.response-content {
    padding: 1rem 0;
}

.response-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    text-align: left;
    /* Keep content left-aligned */
}

.response-text h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.response-text p {
    margin-bottom: 1rem;
}

.response-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Input Container - matches header width */
.input-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(26, 26, 46, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on input focus */
.input-wrapper:focus-within::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -100%;
    width: 100%;
    height: calc(100% + 4px);
    background: linear-gradient(90deg,
            transparent,
            rgba(147, 51, 234, 0.4),
            transparent);
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}



.main-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 300;
    padding: 0.4rem 0;
}

.main-input::placeholder {
    color: var(--text-muted);
}

.send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

/* Breathing color pulse effect */
.send-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7 0%, #f472b6 100%);
    opacity: 0;
    animation: buttonColorPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes buttonColorPulse {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 0.6;
    }
}

.send-button:hover {
    background: var(--gradient-hover);
    transform: scale(1.05);
}

.send-button:active {
    transform: scale(0.95);
}

.send-button svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 1;
}

/* Loading Indicator - Ping Pong Ball */
.loading-indicator {
    text-align: center;
    margin-top: 1rem;
}

.ping-pong {
    width: 100%;
    height: 30px;
    position: relative;
    display: flex;
    align-items: center;
}

.ping-pong .ball {
    width: 12px;
    height: 12px;
    background: var(--gradient-primary);
    border-radius: 50%;
    position: absolute;
    animation: pingPong 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.6);
}

@keyframes pingPong {

    0%,
    100% {
        left: 0;
    }

    50% {
        left: calc(100% - 12px);
    }
}



/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .logo {
        font-size: 2rem;
    }

    .suggestion-tags {
        width: 100%;
        justify-content: flex-start;
    }

    .suggestions {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .suggestion-tags {
        justify-content: center;
    }

    .response-content {
        padding: 1.5rem;
    }

    .response-text {
        font-size: 0.95rem;
    }

    .main-input {
        font-size: 0.9rem;
    }

    .input-wrapper {
        padding: 0.35rem 0.35rem 0.35rem 1.5rem;
    }

    .send-button {
        width: 44px;
        height: 44px;
    }

    .suggestion-tags {
        gap: 0.4rem;
    }

    .suggestion-tag {
        padding: 0.35rem 0.85rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }
}