/* ============================================
   LUXURY QUOTE GENERATOR - PREMIUM DESIGN
   ============================================ */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --tertiary-gradient: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    --dark-bg: #0f0f1e;
    --card-bg: rgba(20, 20, 35, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e0;
    --accent: #667eea;
    --success: #10b981;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   BACKGROUND ANIMATIONS
   ============================================ */

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0f0f1e 0%, #1a1a3e 50%, #0f0f1e 100%);
    z-index: -2;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.gradient-orb-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.gradient-orb-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    bottom: -150px;
    right: -100px;
    animation-delay: 2s;
}

.gradient-orb-3 {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(20px, -20px);
    }
    50% {
        transform: translate(-20px, 20px);
    }
    75% {
        transform: translate(-20px, -20px);
    }
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.main-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    text-align: center;
    margin-bottom: 80px;
    animation: slideDownIn 0.8s ease-out;
}

.brand {
    font-family: 'Playfair Display', serif;
    font-size: 64px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: 4px;
}

.tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 2px;
    font-style: italic;
}

@keyframes slideDownIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   QUOTE CARD
   ============================================ */

.quote-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin-bottom: 60px;
    animation: popIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quote-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 80px 60px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1),
                0 0 40px rgba(240, 147, 251, 0.1);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    z-index: 2;
}

.quote-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 80px rgba(102, 126, 234, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.15),
                0 0 60px rgba(240, 147, 251, 0.2);
    transform: translateY(-10px);
}

.card-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 40px;
    background: radial-gradient(ellipse, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    z-index: 1;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Decorative Elements */
.card-decoration {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.card-decoration-top {
    top: 30px;
}

.card-decoration-bottom {
    bottom: 30px;
}

.quote-icon {
    position: absolute;
    top: 20px;
    left: 30px;
    width: 80px;
    height: 80px;
    opacity: 0.3;
    animation: rotateIn 1s ease-out 0.3s both;
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-30deg) scale(0.5);
    }
    to {
        opacity: 0.3;
        transform: rotate(0) scale(1);
    }
}

/* Quote Content */
.quote-content {
    text-align: center;
    margin: 40px 0;
}

.quote-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    line-height: 1.7;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 30px;
    color: var(--text-primary);
    transition: all 0.6s ease;
    animation: textFadeIn 0.8s ease-out 0.2s both;
}

.quote-author {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.6s ease;
    animation: textFadeIn 0.8s ease-out 0.4s both;
}

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

.quote-text.fade-out {
    animation: fadeOutUp 0.4s ease-out forwards;
}

.quote-text.fade-in {
    animation: fadeInDown 0.6s ease-out forwards;
}

.quote-author.fade-out {
    animation: fadeOutUp 0.4s ease-out forwards;
}

.quote-author.fade-in {
    animation: fadeInDown 0.6s ease-out 0.1s forwards;
}

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

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

/* Quote Stats */
.quote-stats {
    text-align: center;
    margin-top: 40px;
}

.quote-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    opacity: 0.8;
}

/* ============================================
   BUTTONS
   ============================================ */

.action-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    animation: slideUpIn 0.8s ease-out 0.3s both;
}

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

.btn {
    border: none;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    font-weight: 600;
}

/* Icon Buttons */
.btn-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent);
    border: 1.5px solid rgba(102, 126, 234, 0.3);
}

.btn-icon:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.2);
}

.btn-icon:active {
    transform: translateY(-2px);
}

/* Primary Button */
.btn-primary {
    padding: 16px 48px;
    font-size: 16px;
    letter-spacing: 1.5px;
    border-radius: 16px;
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 280px;
    justify-content: center;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
    z-index: 1;
}

.btn-primary:hover::before {
    transform: scale(1);
}

.btn-primary:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(102, 126, 234, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(-3px);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-icon-inline {
    position: relative;
    z-index: 2;
    font-size: 18px;
    animation: spin 0.5s ease-in-out;
}

@keyframes spin {
    0% { transform: scale(1) rotate(0); }
    50% { transform: scale(1.3) rotate(20deg); }
    100% { transform: scale(1) rotate(0); }
}

/* ============================================
   SECONDARY ACTIONS
   ============================================ */

.secondary-actions {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideUpIn 0.8s ease-out 0.5s both;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.btn-action::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.btn-action:hover {
    color: var(--accent);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-3px);
}

.btn-action:hover::before {
    width: 100%;
}

.btn-action svg {
    stroke: currentColor;
}

.btn-action.active {
    color: var(--success);
}

.btn-action.active svg {
    fill: var(--success);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    text-align: center;
    margin-top: auto;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUpIn 0.8s ease-out 0.6s both;
}

.footer p {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    font-style: italic;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .brand {
        font-size: 48px;
    }

    .quote-card {
        padding: 60px 40px;
    }

    .quote-text {
        font-size: 32px;
    }

    .quote-author {
        font-size: 18px;
    }

    .action-buttons {
        flex-wrap: wrap;
        gap: 15px;
    }

    .btn-primary {
        max-width: 100%;
    }

    .secondary-actions {
        gap: 20px;
    }

    .btn-action {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 20px 15px;
    }

    .header {
        margin-bottom: 50px;
    }

    .brand {
        font-size: 38px;
        letter-spacing: 2px;
    }

    .tagline {
        font-size: 14px;
    }

    .quote-card {
        padding: 50px 30px;
        border-radius: 24px;
    }

    .quote-text {
        font-size: 24px;
        line-height: 1.5;
    }

    .quote-author {
        font-size: 16px;
    }

    .action-buttons {
        margin-bottom: 30px;
    }

    .btn-primary {
        font-size: 14px;
        padding: 14px 32px;
    }

    .secondary-actions {
        gap: 15px;
    }

    .btn-action {
        font-size: 13px;
        padding: 8px 16px;
    }

    .btn-icon {
        width: 48px;
        height: 48px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --dark-bg: #ffffff;
        --card-bg: rgba(240, 240, 250, 0.7);
        --text-primary: #1a1a2e;
        --text-secondary: #64748b;
    }

    body {
        background: linear-gradient(180deg, #f8f8ff 0%, #ededf8 50%, #f8f8ff 100%);
    }

    .quote-card {
        box-shadow: 0 20px 60px rgba(102, 126, 234, 0.1),
                    inset 0 1px 0 rgba(255, 255, 255, 0.5),
                    0 0 40px rgba(240, 147, 251, 0.05);
    }

    .quote-card:hover {
        box-shadow: 0 30px 80px rgba(102, 126, 234, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 0.6),
                    0 0 60px rgba(240, 147, 251, 0.1);
    }
}
