:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --accent: #9333ea;
    --bg: #ffffff;
    --bg-subtle: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-dim: #475569;
    --border: rgba(15, 23, 42, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --premium-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
}

.active-link {
    color: var(--primary) !important;
    font-weight: 700 !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* ========== HEADER ========== */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 0.8rem 0;
}

.glass-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo a {
    text-decoration: none;
    color: var(--text);
}

/* ========== HERO ========== */
.hero {
    padding: 12rem 0 10rem;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.12), transparent 40%),
        radial-gradient(circle at bottom left, rgba(147, 51, 234, 0.12), transparent 40%),
        var(--bg);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.03;
    z-index: 1;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1;
    letter-spacing: -2px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero {
        padding: 10rem 0 6rem;
    }
}

/* ========== 3D SCENE ========== */
.scene-3d {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    perspective: 1000px;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.cube-3d {
    position: absolute;
    top: 20%;
    right: 15%;
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    animation: rotate-cube 20s infinite linear;
    opacity: 0.15;
}

.side {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.front {
    transform: translateZ(50px);
}

.back {
    transform: rotateY(180deg) translateZ(50px);
}

.right {
    transform: rotateY(90deg) translateZ(50px);
}

.left {
    transform: rotateY(-90deg) translateZ(50px);
}

.top {
    transform: rotateX(90deg) translateZ(50px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(50px);
}

@keyframes rotate-cube {
    from {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    to {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
    }
}

.floating-card-3d {
    position: absolute;
    top: 60%;
    left: 10%;
    width: 150px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1rem;
    transform: rotateY(25deg) rotateX(10deg);
    animation: float 6s infinite ease-in-out;
    box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotateY(25deg);
    }

    50% {
        transform: translateY(-20px) rotateY(30deg);
    }
}

/* ========== MOBILE NAV ========== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text);
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 6rem 2rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        display: none;
        /* Hidden until toggled */
    }

    nav.mobile-active {
        right: 0;
        display: flex;
    }

    nav a {
        font-size: 1.2rem;
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1.5rem;
        display: block;
        /* Show always in mobile menu for simplicity */
    }
}

.hero-dark .badge {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.badge {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    display: inline-block;
    font-size: 0.75rem;
    margin-bottom: 2.5rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -3px;
    margin-bottom: 2rem;
    color: var(--text);
    animation: fadeInUp 0.8s ease-out both;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
        letter-spacing: -1.5px;
    }
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    max-width: 700px;
    margin: 0 auto 3rem;
    font-weight: 400;
    animation: fadeInUp 1s ease-out;
}

/* ========== SEARCH BAR ========== */
.search-bar {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 0.6rem;
    display: flex;
    max-width: 650px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
    z-index: 10;
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1), 0 15px 50px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.search-bar input {
    background: transparent;
    border: none;
    flex: 1;
    padding: 0.8rem 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}

.search-bar input:focus {
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-dim);
}

.search-bar button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-bar button:hover {
    transform: scale(1.05);
}

/* ========== NEWS GRID ========== */
.news-grid {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: var(--text);
}

.timestamp {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

/* ========== CARD ========== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 0;
    /* Removed padding to allow image to be full width */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.card-image-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-content {
    padding: 1.5rem 1.8rem 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-light);
    box-shadow: 0 30px 60px rgba(79, 70, 229, 0.1);
}

.card:hover h3 {
    color: var(--primary);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--text);
    line-height: 1.35;
    font-weight: 800;
}

.card .preview {
    color: var(--text-dim);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    margin-top: auto;
}

.card .prompt-badge {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.card:hover .prompt-badge {
    gap: 0.8rem;
}

/* ========== INSIGHT BOX INSIDE CARD ========== */
.insight-box {
    background: #f8f8ff;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary);
    margin-bottom: 1.5rem;
}

.insight-box strong {
    display: block;
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.insight-box p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* ========== CTA BOX ========== */
.cta-box {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    border-radius: 1.5rem;
    padding: 3.5rem;
    text-align: center;
    margin: 3rem auto;
    color: white;
}

.cta-box h3 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.cta-box p {
    opacity: 0.9;
}

.cta-box form {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-box input {
    flex: 1;
    padding: 0.9rem 1rem;
    border-radius: 0.5rem;
    border: none;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    font-weight: 500;
    min-width: 0;
    font-family: inherit;
}

.cta-box button {
    padding: 0.9rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    background: #0f172a;
    color: white;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s;
    font-family: inherit;
}

.cta-box button:hover {
    transform: scale(1.05);
    background: #1e293b;
}

/* ========== FOOTER ========== */
footer {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border: 1px solid var(--border);
    margin: 12% auto;
    padding: 2.5rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-content h2 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.modal-content p {
    color: var(--text-dim);
}

.modal-content input {
    width: 100%;
    padding: 0.9rem;
    margin-top: 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 0.5rem;
    font-family: inherit;
}

.modal-content input:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
}

.close {
    color: var(--text-dim);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 8px;
}

.close:hover {
    color: var(--text);
}

.tiny-text {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 1rem;
}

/* ========== DROPDOWN ========== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: var(--text);
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.dropdown-content a {
    color: var(--text-dim);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    margin-left: 0;
    font-weight: 500;
    transition: all 0.15s;
}

.dropdown-content a:hover {
    background: #f0f0ff;
    color: var(--primary);
}

.dropdown-content a.active-link {
    color: var(--primary);
    background: #f0f0ff;
    font-weight: 700;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ========== PRIMARY BUTTON ========== */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.55rem 1.3rem;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    margin-left: 0.5rem;
    transition: transform 0.2s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* ========== LOADING SKELETON ========== */
.loading-skeleton .card {
    min-height: 200px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border: none;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .hero {
        padding: 7rem 0 3rem;
    }

    .cta-box {
        padding: 2rem;
    }

    .cta-box h3 {
        font-size: 1.5rem;
    }

    .cta-box form {
        flex-direction: column;
    }
}

/* ========== SKELETON LOADING ========== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    pointer-events: none;
    min-height: 220px;
}

/* ========== SMOOTH TRANSITIONS ========== */
.card {
    animation: cardFadeIn 0.3s ease forwards;
    opacity: 0;
}

.card:nth-child(1) {
    animation-delay: 0.0s;
}

.card:nth-child(2) {
    animation-delay: 0.05s;
}

.card:nth-child(3) {
    animation-delay: 0.1s;
}

.card:nth-child(4) {
    animation-delay: 0.15s;
}

.card:nth-child(5) {
    animation-delay: 0.2s;
}

.card:nth-child(6) {
    animation-delay: 0.25s;
}

.card:nth-child(7) {
    animation-delay: 0.3s;
}

.card:nth-child(8) {
    animation-delay: 0.35s;
}

.card:nth-child(9) {
    animation-delay: 0.4s;
}

.card:nth-child(10) {
    animation-delay: 0.45s;
}

.card:nth-child(11) {
    animation-delay: 0.5s;
}

.card:nth-child(12) {
    animation-delay: 0.55s;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skeleton-card {
    opacity: 1 !important;
    animation: none !important;
}

/* ========== DAILY BRIEFING (TOP 3) ========== */
.briefing-section {
    margin-bottom: 4rem;
}

.briefing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.briefing-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    border-top: 4px solid var(--primary);
}

.briefing-card .rank {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

/* ========== ROI CALCULATOR ========== */
.roi-section {
    padding: 6rem 0;
    background: #fbfbfe;
    border-radius: 3rem;
    margin: 4rem 0;
}

.roi-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

.roi-action-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.roi-action-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

@media (max-width: 900px) {
    .roi-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.roi-card {
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-hover);
}

.roi-inputs {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.roi-inputs input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.roi-result {
    text-align: center;
}

.roi-result h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: #eff6ff;
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
    margin-bottom: 1rem;
}

.stat-val {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    color: var(--text-dim);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* ========== PLAYGROUND OVERLAY ========== */
.playground-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.playground-content {
    background: white;
    width: 90%;
    max-width: 800px;
    border-radius: 1.5rem;
    padding: 3rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.playground-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

@media (max-width: 700px) {
    .playground-grid {
        grid-template-columns: 1fr;
    }
}

.playground-editor pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    white-space: pre-wrap;
    border: 1px solid var(--primary-light);
}

.playground-sim {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.playground-sim h4 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* ========== VIRAL AI STRATEGY TOOL ========== */
.viral-tool-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, var(--bg) 0%, #f0f4ff 100%);
}

.viral-tool-box {
    background: white;
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 3.5rem;
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.viral-tool-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--premium-gradient);
}

.viral-tool-input-area {
    margin-top: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.viral-input-wrapper {
    display: flex;
    background: white;
    border: 2px solid var(--border);
    border-radius: 1rem;
    padding: 0.4rem;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.viral-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1), 0 10px 30px rgba(0, 0, 0, 0.08);
}

.viral-input-wrapper input {
    flex: 1;
    border: none;
    padding: 0.9rem 1.2rem;
    font-size: 1.05rem;
    font-family: inherit;
    background: transparent;
    color: var(--text);
    outline: none;
}

.viral-input-wrapper button {
    background: var(--premium-gradient);
    color: white;
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 0.7rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: inherit;
}

.viral-input-wrapper button:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.viral-input-wrapper button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.viral-quick-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.viral-quick-tags span {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dim);
}

.viral-quick-tags span:hover {
    background: #eef2ff;
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Result Card */
.viral-result {
    margin-top: 2.5rem;
    text-align: left;
    background: #fafbff;
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 1.5rem;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.viral-result-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.viral-result-header h3 {
    color: white;
    font-size: 1.15rem;
    margin: 0;
}

.viral-result-actions {
    display: flex;
    gap: 0.5rem;
}

.viral-action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.viral-action-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.viral-share-btn {
    background: #0077b5;
    border-color: #0077b5;
}

.viral-share-btn:hover {
    background: #005b8f;
}

.viral-result-body {
    padding: 2rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
}

.viral-result-body strong {
    color: var(--primary);
}

.viral-result-body p {
    margin-bottom: 0.8rem;
}

.viral-result-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(147, 51, 234, 0.05));
    border-top: 1px solid rgba(79, 70, 229, 0.1);
    text-align: center;
}

.viral-result-footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Loading pulse */
.viral-loading {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: viralPulse 1s infinite;
    margin-right: 0.5rem;
}

@keyframes viralPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@media (max-width: 768px) {
    .viral-tool-box {
        padding: 2rem 1.2rem;
        border-radius: 1.2rem;
    }

    .viral-tool-box h2 {
        font-size: 1.8rem !important;
    }

    .viral-input-wrapper {
        flex-direction: column;
    }

    .viral-input-wrapper button {
        border-radius: 0.7rem;
    }

    .viral-result-header {
        padding: 1rem 1.2rem;
        flex-direction: column;
        text-align: center;
    }

    .viral-result-body {
        padding: 1.2rem;
    }
}