/* ========================================
   SORA AI VIDEO GENERATOR - STYLE.CSS
   Theme: Purple, Gold, White
   ======================================== */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* === ANIMATED BACKGROUND === */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0d2e 0%, #2d1b4e 25%, #1e1539 50%, #0f0520 75%, #000000 100%);
    z-index: -2;
}

/* Animated Stars */
.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.star:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.star:nth-child(2) { top: 30%; left: 60%; animation-delay: 0.5s; }
.star:nth-child(3) { top: 50%; left: 80%; animation-delay: 1s; }
.star:nth-child(4) { top: 70%; left: 30%; animation-delay: 1.5s; }
.star:nth-child(5) { top: 20%; left: 90%; animation-delay: 2s; }
.star:nth-child(6) { top: 60%; left: 10%; animation-delay: 2.5s; }
.star:nth-child(7) { top: 80%; left: 70%; animation-delay: 3s; }
.star:nth-child(8) { top: 40%; left: 40%; animation-delay: 3.5s; }

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #a855f7, #fbbf24);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 30%; animation-delay: 4s; }
.particle:nth-child(3) { left: 50%; animation-delay: 8s; }
.particle:nth-child(4) { left: 70%; animation-delay: 12s; }
.particle:nth-child(5) { left: 90%; animation-delay: 16s; }

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0;
    }
}

/* === CONTAINER === */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* === HEADER === */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.logo-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4), transparent);
    border-radius: 50%;
    filter: blur(30px);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.logo-icon {
    width: 60px;
    height: 60px;
    color: #fbbf24;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.6));
    position: relative;
    z-index: 1;
    animation: rotate 20s linear infinite;
}

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

.title {
    display: block;
    margin-top: 1rem;
}

.title-main {
    display: block;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #a855f7 0%, #fbbf24 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
    text-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
    animation: shimmer 3s infinite;
}

.title-sub {
    display: block;
    font-size: 2rem;
    font-weight: 300;
    color: #e9d5ff;
    letter-spacing: 4px;
    margin-top: 0.5rem;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.subtitle {
    font-size: 1.1rem;
    color: #c4b5fd;
    margin-bottom: 1rem;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(251, 191, 36, 0.2));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: #fbbf24;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    animation: blink 2s infinite;
    box-shadow: 0 0 10px #fbbf24;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* === MAIN CARD === */
.main-card {
    position: relative;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(251, 191, 36, 0.05));
    backdrop-filter: blur(20px);
    border: 2px solid;
    border-image: linear-gradient(135deg, #a855f7, #fbbf24, #ffffff) 1;
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 
        0 0 60px rgba(168, 85, 247, 0.3),
        0 0 100px rgba(251, 191, 36, 0.2),
        inset 0 0 60px rgba(255, 255, 255, 0.05);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3), transparent);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

/* === INPUT GROUP === */
.input-group {
    margin-bottom: 2rem;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #e9d5ff;
}

.label-icon {
    font-size: 1.3rem;
}

.label-text {
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.label-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.label-badge.optional {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.input-wrapper,
.textarea-wrapper {
    position: relative;
}

.input-field {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 15px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: #a855f7;
    box-shadow: 
        0 0 20px rgba(168, 85, 247, 0.4),
        0 0 40px rgba(251, 191, 36, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.textarea-field {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a855f7, #fbbf24);
    transition: width 0.3s ease;
}

.input-field:focus + .input-border {
    width: 100%;
}

/* === GENERATE BUTTON === */
.generate-btn {
    position: relative;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(135deg, #a855f7, #7c3aed, #fbbf24);
    background-size: 200% 200%;
    border: none;
    border-radius: 20px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 10px 30px rgba(168, 85, 247, 0.4),
        0 0 60px rgba(251, 191, 36, 0.3);
    animation: gradientShift 3s ease infinite;
}

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

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(168, 85, 247, 0.6),
        0 0 80px rgba(251, 191, 36, 0.4);
}

.generate-btn:active {
    transform: translateY(-1px);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -50%; }
    100% { left: 150%; }
}

.btn-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    z-index: 1;
}

.btn-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.generate-btn.loading .btn-icon {
    animation: spin 1s linear infinite;
}

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

/* === ERROR BOX === */
.error-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

.error-icon {
    width: 30px;
    height: 30px;
    color: #fca5a5;
}

.error-box p {
    color: #fca5a5;
    font-weight: 600;
}

/* === RESULT BOX === */
.result-box {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.05));
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.success-icon {
    width: 35px;
    height: 35px;
    color: #4ade80;
}

.result-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4ade80;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.video-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-player {
    width: 100%;
    border-radius: 15px;
    border: 2px solid rgba(168, 85, 247, 0.3);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 15px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.6);
}

.download-icon {
    width: 1.3rem;
    height: 1.3rem;
}

/* === FOOTER === */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-links a {
    color: #fbbf24;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a855f7, #fbbf24);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-links a:hover {
    color: #a855f7;
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* === UTILITY === */
.hidden {
    display: none !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .main-card {
        padding: 2rem 1.5rem;
    }

    .title-main {
        font-size: 2.5rem;
    }

    .title-sub {
        font-size: 1.5rem;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
    }

    .generate-btn {
        font-size: 1rem;
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .title-main {
        font-size: 2rem;
    }

    .title-sub {
        font-size: 1.2rem;
    }

    .main-card {
        padding: 1.5rem 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}
