/* =========================================
   HERO MODULE - ELITE STUDIO V32 (PERFECT EDGE)
   ========================================= */

:root {
    --studio-bg: #020617;
    --studio-card-bg: #0f172a;
    --accent-pink: #ff3366;
    --accent-blue: #00ADEF;
    --text-muted: #64748b;
    --text-light: #ffffff;
    --border-light: rgba(255, 255, 255, 0.08);
}

.hero {
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--studio-bg);
    font-family: 'Inter', sans-serif;
}

/* BACKGROUND */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(255, 51, 102, 0.15) 60deg, transparent 120deg, rgba(0, 173, 239, 0.1) 240deg, transparent 360deg);
    animation: spinBg 25s linear infinite;
    filter: blur(100px);
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    z-index: 2;
}

/* TYPOGRAPHY */
.hero-badge-container {
    margin-bottom: 25px;
}

.hero-badge {
    display: inline-block;
    padding: 5px 14px;
    background: var(--border-light);
    color: var(--accent-pink);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(255, 51, 102, 0.2);
    opacity: 0;
    animation: badgeEntry 1s ease-out forwards;
}

.hero-title {
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-light);
}

.line-mask {
    display: block;
    overflow: hidden;
    height: 1.2em;
    position: relative;
}

.line-text {
    display: block;
    will-change: transform, opacity;
}

.text-visible {
    opacity: 1;
    transform: translateY(0);
    animation: baselineRise 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.accent-animate {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-blue), var(--accent-pink));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s linear infinite !important;
    padding-right: 15px;
}

.hero-description {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 480px;
    line-height: 1.6;
}

/* BUTTONS */
.cta-group {
    display: flex;
    gap: 12px;
}

.cta-button {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    font-size: 13px;
    text-transform: uppercase;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--accent-pink) 0%, #ff1149 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(255, 51, 102, 0.2);
}

.cta-button.outline {
    background: var(--border-light);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-button:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
}

/* === STACK LAYOUT === */
.hero-stack-wrapper {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 1. CONVERTER CARD */
.converter-card {
    position: relative;
    padding: 20px;
    border-radius: 18px;
    background: var(--studio-card-bg);
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    z-index: 2;
    overflow: hidden;
    box-sizing: border-box;
}

.converter-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-pink), transparent);
    opacity: 0.6;
}

/* 2. DICTIONARY CARD (THE MASSIVE GLOW FIX) */
.dictionary-card {
    position: relative;
    border-radius: 20px;
    background: transparent;
    z-index: 1;
    overflow: hidden;
    /* Soft Outer Glow */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 173, 239, 0.15);
    padding: 2px;
    /* Border thickness */
}

/* The Spinning "Giant" Background - 600% Size to cover wide corners */
.dictionary-card::before {
    content: "";
    position: absolute;
    /* Massive Dimensions to ensure corners are covered */
    width: 600%;
    height: 600%;
    /* Center the massive circle */
    top: -250%;
    left: -250%;

    background: conic-gradient(from 0deg,
            transparent 0%,
            transparent 20%,
            var(--accent-blue) 30%,
            var(--accent-pink) 50%,
            var(--accent-blue) 70%,
            transparent 80%,
            transparent 100%);

    animation: borderRotate 6s linear infinite;
    /* Slower, smoother spin */
    z-index: -2;
}

/* The Card Face (Mask) */
.dictionary-inner {
    position: relative;
    background: var(--studio-card-bg);
    width: 100%;
    height: 100%;
    border-radius: 18px;
    /* Matches parent */
    padding: 15px 20px;
    z-index: 1;
    box-sizing: border-box;
}

/* HEADER & UTILS */
.card-header-studio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.card-header-studio h3 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.mini-select-modern {
    background: var(--border-light);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

/* INPUTS */
.input-area-wrapper {
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.panel-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    padding: 0 2px;
}

.panel-actions-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.panel-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tool-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
}

.tool-action-btn:hover {
    color: var(--accent-pink);
    transform: scale(1.1);
}

.tool-action-btn span {
    font-size: 18px;
}

#undoAction {
    font-size: 10px;
    color: var(--accent-blue);
    text-decoration: underline;
    cursor: pointer;
    margin-left: 5px;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

#undoAction.visible {
    opacity: 1;
    pointer-events: auto;
}

.hero-input-studio,
.hero-output-studio {
    width: 100% !important;
    height: 80px;
    background: rgba(2, 6, 23, 0.6) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-size: 14px;
    resize: none;
    outline: none !important;
    line-height: 1.5;
    transition: 0.3s;
    box-sizing: border-box;
    display: block;
    margin: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hero-input-studio:focus {
    background: rgba(2, 6, 23, 0.95) !important;
}

/* SWAP */
.hero-divider-line {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10px;
    margin: 5px 0;
    position: relative;
    z-index: 10;
}

.swap-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.4s;
    width: 40px;
    height: 40px;
}

.swap-action-btn:hover {
    color: var(--accent-pink);
    transform: rotate(180deg) scale(1.2);
}

.swap-action-btn span {
    font-size: 28px !important;
}

/* === SMART DICTIONARY === */
.dict-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* Animated Smart Label */
.dict-icon {
    font-size: 18px;
    color: var(--accent-blue);
    text-shadow: 0 0 10px rgba(0, 173, 239, 0.8);
    animation: iconFloat 3s ease-in-out infinite;
}

.dict-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--accent-blue), #ffffff, var(--accent-blue));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 3s linear infinite;
}

.dict-search-box {
    width: 100% !important;
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.single-line {
    height: 42px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-right: 40px !important;
    transition: 0.3s;
}

.single-line:focus {
    border-color: var(--accent-blue) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 0 15px rgba(0, 173, 239, 0.2);
}

/* MIC ICON */
.mic-icon-wrapper {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s;
    background: transparent;
    z-index: 10;
}

.mic-icon-wrapper span {
    font-size: 18px;
    color: var(--text-muted);
    transition: 0.3s;
}

.mic-icon-wrapper:hover span {
    color: #fff;
}

.listening {
    background: rgba(255, 51, 102, 0.1);
    box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.7);
    animation: mic-pulse 1.5s infinite cubic-bezier(0.66, 0, 0, 1);
}

.listening span {
    color: #ff3366 !important;
}

/* RESULT POPUP */
.dict-result-popup {
    margin-top: 8px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.98);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 250px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.close-icon {
    position: absolute;
    top: 4px;
    right: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    z-index: 5;
}

.close-icon:hover {
    color: #fff;
}

.dict-list-item {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 13px;
    transition: 0.2s;
}

.dict-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-blue);
    padding-left: 12px;
}

.dict-list-item:last-child {
    border-bottom: none;
}

.word-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-pink);
    display: block;
    margin-bottom: 2px;
}

.word-type {
    font-size: 9px;
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 5px;
    color: var(--accent-blue);
}

.dict-definition p {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.4;
    margin: 0;
}

.highlight {
    color: #fff;
    background: rgba(0, 173, 239, 0.4);
    border-radius: 2px;
    font-weight: 800;
    padding: 0 2px;
}

.fade-in {
    animation: btnEntry 0.3s ease;
}

/* TOAST */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--accent-blue);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* GLOW BUTTONS */
.glow-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    border-radius: 6px;
    background: rgba(0, 173, 239, 0.08);
    border: 1px solid rgba(0, 173, 239, 0.3);
    color: var(--accent-blue);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    animation: btnEntry 0.4s ease forwards;
    transition: 0.3s;
    box-sizing: border-box;
}

.glow-action-btn:hover {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 173, 239, 0.5);
}

.glow-action-btn.small-btn {
    border-color: rgba(255, 51, 102, 0.3);
    color: var(--accent-pink);
    background: rgba(255, 51, 102, 0.08);
}

.glow-action-btn.small-btn:hover {
    background: var(--accent-pink);
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 51, 102, 0.5);
}

/* FOOTER */
.card-mini-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.update-pulse {
    animation: pulseGlow 0.5s ease;
}

.std-font {
    font-family: 'Geetanjali', 'ABTT-Geetanjali', sans-serif !important;
    font-size: 18px !important;
    color: var(--accent-blue) !important;
}

/* ANIMATIONS */
@keyframes textShimmer {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes mic-pulse {
    to {
        box-shadow: 0 0 0 10px rgba(255, 51, 102, 0);
    }
}

@keyframes pulseGlow {
    0% {
        border-color: var(--border-light);
    }

    50% {
        border-color: var(--accent-blue);
        box-shadow: 0 0 10px rgba(0, 173, 239, 0.2);
    }

    100% {
        border-color: var(--border-light);
    }
}

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

    to {
        transform: rotate(360deg);
    }
}

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

    to {
        transform: rotate(360deg);
    }
}

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

@keyframes baselineRise {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

@keyframes btnEntry {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

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

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

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-right {
        justify-content: center;
        margin-top: 40px;
    }

    .hero-title {
        font-size: 45px;
    }
}