/* ============================================================
   LinkedIn Translator — Premium Design
   ============================================================ */

:root {
    --blue:        #0a66c2;
    --blue-dark:   #004182;
    --blue-light:  #dbeafe;
    --bg:          #f0f4f8;
    --surface:     #ffffff;
    --border:      #e2e8f0;
    --text:        #0f172a;
    --text-2:      #475569;
    --text-3:      #94a3b8;
    --purple:      #7c3aed;
    --purple-l:    #ede9fe;
    --green:       #16a34a;
    --red:         #dc2626;
    --r:           12px;
    --r-lg:        20px;
    --shadow:      0 4px 24px rgba(0,0,0,0.07);
    --shadow-lg:   0 16px 48px rgba(0,0,0,0.12);
    --ease:        cubic-bezier(0.4,0,0.2,1);
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    background:var(--bg);
    color:var(--text);
    line-height:1.6;
    min-height:100vh;
    -webkit-font-smoothing:antialiased;
}
a { color:var(--blue); text-decoration:none; }
a:hover { text-decoration:underline; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position:relative;
    min-height:92vh;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    overflow:hidden;
    padding:2rem 1.5rem 5rem;
}

.hero-bg {
    position:absolute;
    inset:0;
    background: linear-gradient(135deg,#0a1628 0%,#0d2045 40%,#0a3060 70%,#0055b3 100%);
    z-index:0;
}

.hero-bg::after {
    content:'';
    position:absolute;
    inset:0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(10,102,194,0.35) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(0,133,255,0.25) 0%, transparent 55%),
        radial-gradient(ellipse 50% 70% at 60% 80%, rgba(124,58,237,0.2) 0%, transparent 60%);
}

.hero-content {
    position:relative;
    z-index:2;
    max-width:720px;
    margin:0 auto;
}

.hero-badge {
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:rgba(255,255,255,0.1);
    border:1px solid rgba(255,255,255,0.18);
    color:rgba(255,255,255,0.9);
    padding:6px 18px;
    border-radius:50px;
    font-size:0.82rem;
    font-weight:600;
    letter-spacing:0.5px;
    text-transform:uppercase;
    margin-bottom:1.5rem;
    backdrop-filter:blur(10px);
}

.hero-badge i { color:#60a5fa; font-size:1rem; }

.hero-title {
    font-size:clamp(3rem,8vw,6rem);
    font-weight:900;
    line-height:1;
    color:white;
    letter-spacing:-3px;
    margin-bottom:1.25rem;
}

.hero-title span {
    background:linear-gradient(90deg,#60a5fa,#a78bfa,#34d399);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
}

.hero-sub {
    font-size:1.15rem;
    color:rgba(255,255,255,0.72);
    margin-bottom:2.5rem;
    line-height:1.7;
}

.hero-cta {
    display:inline-flex;
    align-items:center;
    gap:10px;
    background:white;
    color:var(--blue);
    padding:14px 32px;
    border-radius:50px;
    font-weight:700;
    font-size:1rem;
    text-decoration:none;
    box-shadow:0 4px 24px rgba(0,0,0,0.2);
    transition:all 0.25s var(--ease);
}

.hero-cta:hover {
    background:var(--blue-light);
    transform:translateY(-2px);
    box-shadow:0 8px 32px rgba(10,102,194,0.35);
    text-decoration:none;
}

/* Floating Buzz Cards */
.hero-floating {
    position:absolute;
    inset:0;
    z-index:1;
    pointer-events:none;
}

.float-card {
    position:absolute;
    background:rgba(255,255,255,0.08);
    backdrop-filter:blur(12px);
    border:1px solid rgba(255,255,255,0.14);
    color:rgba(255,255,255,0.85);
    padding:8px 16px;
    border-radius:50px;
    font-size:0.85rem;
    font-weight:600;
    white-space:nowrap;
}

.fc1 { top:12%; left:6%;  animation:float1 6s ease-in-out infinite; }
.fc2 { top:20%; right:8%; animation:float2 7s ease-in-out infinite 0.5s; }
.fc3 { bottom:28%; left:4%; animation:float1 8s ease-in-out infinite 1s; }
.fc4 { bottom:18%; right:6%; animation:float2 6.5s ease-in-out infinite 0.3s; }
.fc5 { top:50%; left:2%; animation:float1 7.5s ease-in-out infinite 0.8s; }

@keyframes float1 {
    0%,100% { transform:translateY(0) rotate(-2deg); }
    50%      { transform:translateY(-18px) rotate(2deg); }
}
@keyframes float2 {
    0%,100% { transform:translateY(0) rotate(2deg); }
    50%      { transform:translateY(-14px) rotate(-1deg); }
}

@media(max-width:600px) { .hero-floating { display:none; } }

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
    max-width:1100px;
    margin:0 auto;
    padding:0 1.25rem;
    width:100%;
}

/* ============================================================
   TRANSLATOR SECTION
   ============================================================ */
.translator-section {
    padding:4rem 0;
    margin-top:-60px;
    position:relative;
    z-index:10;
}

/* MODE BAR */
.mode-bar {
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:1.25rem;
    flex-wrap:wrap;
}

.mode-label {
    font-size:0.88rem;
    font-weight:600;
    color:var(--text-2);
}

.mode-pills {
    display:flex;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:50px;
    padding:4px;
    gap:4px;
    box-shadow:var(--shadow);
}

.pill {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:7px 18px;
    border:none;
    border-radius:50px;
    font-size:0.88rem;
    font-weight:600;
    font-family:'Inter',sans-serif;
    cursor:pointer;
    color:var(--text-2);
    background:transparent;
    transition:all 0.2s var(--ease);
}

.pill:hover { color:var(--text); background:var(--bg); }

.pill.active {
    background:var(--blue);
    color:white;
    box-shadow:0 2px 10px rgba(10,102,194,0.4);
}

.pill[data-mode="best"].active {
    background:linear-gradient(135deg,var(--purple),#a855f7);
    box-shadow:0 2px 10px rgba(124,58,237,0.4);
}

.mode-desc {
    font-size:0.82rem;
    color:var(--text-3);
    font-style:italic;
}

/* TRANSLATOR CARD */
.translator-card {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--r-lg);
    box-shadow:var(--shadow-lg);
    display:grid;
    grid-template-columns:1fr 48px 1fr;
    overflow:hidden;
    min-height:480px;
}

/* PANELS */
.t-panel {
    display:flex;
    flex-direction:column;
}

.t-panel-top {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:14px 20px;
    border-bottom:1px solid var(--border);
    background:#fafbfc;
    flex-shrink:0;
}

.lang-tag {
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-size:0.85rem;
    font-weight:600;
    color:var(--text-2);
}

/* Language Dropdown */
.lang-selector-container {
    position: relative;
}
.cursor-pointer {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: -8px;
}
.cursor-pointer:hover {
    background: rgba(0,0,0,0.05);
}
.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: max-content;
    min-width: 150px;
    z-index: 50;
    display: none;
    flex-direction: column;
    padding: 6px;
    max-height: 250px;
    overflow-y: auto;
}
.lang-dropdown.show {
    display: flex;
}
.lang-option {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.lang-option:hover {
    background: var(--blue-light);
    color: var(--blue);
}
.lang-option.active {
    background: var(--blue);
    color: white;
}

.lang-tag.linkedin { color:var(--blue); }

.lang-tag .detected {
    background:var(--blue-light);
    color:var(--blue);
    font-size:0.75rem;
    font-weight:700;
    padding:2px 9px;
    border-radius:20px;
    animation:pop 0.3s var(--ease);
}

@keyframes pop {
    0%   { transform:scale(0.7); opacity:0; }
    100% { transform:scale(1);   opacity:1; }
}

/* Input area */
textarea {
    flex:1;
    width:100%;
    border:none;
    outline:none;
    resize:none;
    padding:20px;
    font-size:1.02rem;
    line-height:1.7;
    font-family:'Inter',sans-serif;
    color:var(--text);
    background:transparent;
    caret-color:var(--blue);
    min-height:340px;
}

textarea::placeholder { color:var(--text-3); }

.t-panel-bottom {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:12px 20px;
    border-top:1px solid var(--border);
    background:#fafbfc;
    flex-shrink:0;
    gap:10px;
}

.output-bottom { justify-content:flex-end; }

.char-count {
    font-size:0.78rem;
    color:var(--text-3);
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
}

.char-count.warn { color:#f59e0b; }
.char-count.over { color:var(--red); }

/* TRANSLATE BUTTON */
.btn-translate {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 22px;
    background:var(--blue);
    color:white;
    border:none;
    border-radius:50px;
    font-size:0.92rem;
    font-weight:700;
    font-family:'Inter',sans-serif;
    cursor:pointer;
    transition:all 0.2s var(--ease);
    white-space:nowrap;
    box-shadow:0 2px 12px rgba(10,102,194,0.35);
    flex-shrink:0;
}

.btn-translate:hover:not(:disabled) {
    background:var(--blue-dark);
    transform:translateY(-1px);
    box-shadow:0 4px 20px rgba(10,102,194,0.45);
}

.btn-translate:disabled {
    background:#94a3b8;
    cursor:not-allowed;
    transform:none;
    box-shadow:none;
}

/* GHOST BUTTON */
.btn-ghost {
    width:32px;
    height:32px;
    border:none;
    background:transparent;
    color:var(--text-3);
    border-radius:8px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:0.95rem;
    transition:all 0.18s;
    flex-shrink:0;
}

.btn-ghost:hover:not(:disabled) { background:var(--bg); color:var(--text); }
.btn-ghost:disabled { opacity:0.3; cursor:default; }
.btn-ghost#copyBtn:not(:disabled):hover { background:var(--blue-light); color:var(--blue); }

/* SHARE BUTTON */
.btn-share {
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:8px 20px;
    border:1.5px solid var(--blue);
    color:var(--blue);
    background:transparent;
    border-radius:50px;
    font-size:0.85rem;
    font-weight:600;
    font-family:'Inter',sans-serif;
    cursor:pointer;
    transition:all 0.2s var(--ease);
}

.btn-share:hover:not(:disabled) { background:var(--blue); color:white; }
.btn-share:disabled { opacity:0.3; cursor:not-allowed; }

/* DIVIDER */
.t-divider {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    background:#fafbfc;
    border-left:1px solid var(--border);
    border-right:1px solid var(--border);
    gap:0;
}

.t-divider-line {
    flex:1;
    width:1px;
    background:var(--border);
}

.t-divider-icon {
    width:34px;
    height:34px;
    border:1.5px solid var(--border);
    border-radius:50%;
    background:var(--surface);
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--text-3);
    font-size:0.85rem;
    flex-shrink:0;
    margin:12px 0;
    box-shadow:var(--shadow);
}

/* OUTPUT BODY */
.t-output-body {
    flex:1;
    padding:20px;
    overflow-y:auto;
    min-height:340px;
    position:relative;
}

/* Placeholder */
.output-placeholder {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    height:100%;
    min-height:280px;
    color:var(--text-3);
    gap:10px;
}

.placeholder-icon {
    font-size:2.5rem;
    filter:grayscale(0.3);
}

.output-placeholder p {
    font-size:0.95rem;
    font-weight:500;
    color:var(--text-3);
}

.output-placeholder small {
    font-size:0.8rem;
    color:var(--text-3);
    opacity:0.7;
}

/* Output text */
.output-real-text {
    font-size:1.02rem;
    line-height:1.75;
    color:var(--text);
    white-space:pre-wrap;
    word-break:break-word;
}

/* LOADER */
.t-loader {
    display:none;
    flex-direction:column;
    gap:11px;
    padding-top:4px;
}

.sk-line {
    height:15px;
    background:linear-gradient(90deg,#e8edf2 25%,#f0f4f8 50%,#e8edf2 75%);
    background-size:300% 100%;
    border-radius:6px;
    animation:shimmer 1.3s infinite;
}

.sk-msg {
    margin-top:8px;
    font-size:0.85rem;
    color:var(--blue);
    font-weight:500;
    text-align:center;
    animation:blink 1.8s ease infinite;
}

@keyframes shimmer {
    0%   { background-position:200% 0; }
    100% { background-position:-200% 0; }
}

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

/* ============================================================
   HOW SECTION
   ============================================================ */
.how-section {
    padding:5rem 0;
    background:var(--surface);
    border-top:1px solid var(--border);
    border-bottom:1px solid var(--border);
}

.section-header {
    text-align:center;
    margin-bottom:3rem;
}

.section-header h2 {
    font-size:2.2rem;
    font-weight:800;
    letter-spacing:-1px;
    margin-bottom:0.5rem;
}

.section-header p {
    color:var(--text-2);
    font-size:1.05rem;
}

.cards-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:1.25rem;
}

.feature-card {
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:var(--r);
    padding:1.75rem 1.5rem;
    transition:all 0.25s var(--ease);
}

.feature-card:hover {
    transform:translateY(-5px);
    box-shadow:var(--shadow-lg);
    border-color:var(--blue);
    background:white;
}

.fc-icon { font-size:2rem; margin-bottom:0.75rem; }

.feature-card h3 {
    font-size:1rem;
    font-weight:700;
    margin-bottom:0.4rem;
}

.feature-card p {
    font-size:0.87rem;
    color:var(--text-2);
    line-height:1.6;
}

/* ============================================================
   EXAMPLES SECTION
   ============================================================ */
.example-section {
    padding:5rem 0;
    background:var(--bg);
}

.examples-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:1.5rem;
}

.example-card {
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--r-lg);
    overflow:hidden;
    box-shadow:var(--shadow);
    display:flex;
    flex-direction:column;
    gap:0;
}

.ex-before, .ex-after {
    padding:1.5rem;
}

.ex-before {
    background:#fafbfc;
    border-bottom:1px solid var(--border);
}

.ex-after { flex:1; }

.ex-arrow {
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0.75rem;
    background:linear-gradient(135deg,var(--bg),#dbeafe);
    color:var(--blue);
    font-size:1.2rem;
}

.ex-tag {
    display:inline-block;
    font-size:0.72rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:1px;
    padding:3px 10px;
    border-radius:20px;
    background:var(--border);
    color:var(--text-2);
    margin-bottom:0.75rem;
}

.ex-tag.linkedin {
    background:var(--blue-light);
    color:var(--blue);
}

.ex-before p, .ex-after p {
    font-size:0.9rem;
    color:var(--text-2);
    line-height:1.65;
}

.ex-hashtags {
    margin-top:0.75rem;
    color:var(--blue) !important;
    font-weight:600;
    font-size:0.82rem !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background:var(--text);
    padding:1.5rem 1.25rem;
}

.footer-inner {
    max-width:1100px;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:1.5rem;
    flex-wrap:wrap;
}

.footer p {
    color:rgba(255,255,255,0.55);
    font-size:0.83rem;
}

.footer a { color:rgba(255,255,255,0.85); }
.footer a:hover { color:white; }

.donate-btn {
    display:inline-flex;
    align-items:center;
    border-radius:8px;
    overflow:hidden;
    transition:opacity 0.2s;
    flex-shrink:0;
}

.donate-btn:hover { opacity:0.8; }
.donate-btn img { height:28px; display:block; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
    position:fixed;
    bottom:1.5rem;
    left:50%;
    transform:translateX(-50%) translateY(80px);
    background:#0f172a;
    color:white;
    padding:10px 22px;
    border-radius:50px;
    font-size:0.88rem;
    font-weight:600;
    box-shadow:var(--shadow-lg);
    transition:transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
    z-index:9999;
    white-space:nowrap;
    pointer-events:none;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media(max-width:900px) {
    .cards-grid    { grid-template-columns:repeat(2,1fr); }
    .examples-grid { grid-template-columns:1fr; }
}

@media(max-width:680px) {
    .translator-card {
        grid-template-columns:1fr;
        grid-template-rows:auto auto auto;
    }

    .t-divider {
        flex-direction:row;
        border-left:none;
        border-right:none;
        border-top:1px solid var(--border);
        border-bottom:1px solid var(--border);
        padding:10px 20px;
        height:auto;
    }

    .t-divider-line  { width:auto; height:1px; }
    .t-divider-icon  { transform:rotate(90deg); margin:0 12px; }

    textarea         { min-height:200px; }
    .t-output-body   { min-height:200px; }

    .hero-title      { letter-spacing:-2px; }
    .hero-sub        { font-size:1rem; }

    .cards-grid      { grid-template-columns:1fr; }
    .mode-bar        { gap:8px; }

    .btn-translate > *:not(i) { display:none; }
    .btn-translate { padding:10px 16px; }
}
