:root {
    --bg-dark: #0f1115;
    --card-bg: #1a1d24;
    --primary: #6c5ce7;
    --primary-hover: #5b4cc4;
    --accent: #00cec9;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #2d3436;
    --gradient-1: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --glass-bg: rgba(26, 29, 36, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 206, 201, 0.1) 0%, transparent 20%);
}

.app-container {
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1400px) {
    .app-container {
        max-width: 1200px;
    }
}

@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
        gap: 1.5rem;
    }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #00b894;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 184, 148, 0.5);
}

/* Cards */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    .card {
        padding: 1.2rem;
    }
}

.input-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Input Tabs */
.input-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.4rem;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--glass-border);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* File Upload */
.file-upload-box {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.1);
}

.file-upload-box:hover {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.05);
}

.file-input {
    display: none;
}

.file-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-muted);
}

.file-label i {
    font-size: 2rem;
    color: var(--primary);
}

/* Inputs */
.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

input[type="text"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* Processed & Recent Clips - Premium Table */
.table-container {
    overflow-x: auto;
    background: var(--glass-bg);
    /* Changed from --card-bg to --glass-bg */
    border: 1px solid var(--glass-border);
    /* Changed from --border-color to --glass-border */
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    /* Changed from 0 4px 6px rgba(0, 0, 0, 0.1) to match card shadow */
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
}

.premium-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.premium-table tr:last-child td {
    border-bottom: none;
}

.premium-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.clip-title-cell {
    font-weight: 600;
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-download-sm {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
    border: 1px solid rgba(108, 92, 231, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download-sm:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

@media (max-width: 768px) {
    .premium-table thead {
        display: none;
    }

    .premium-table tr {
        display: block;
        margin-bottom: 1.5rem;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        padding: 1rem;
    }

    .premium-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .premium-table td:last-child {
        border-bottom: none;
        padding-top: 1rem;
    }

    .premium-table td::before {
        content: attr(data-label);
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.8rem;
        color: var(--text-muted);
        text-align: left;
    }

    .clip-title-cell {
        max-width: none;
        white-space: normal;
    }
}

@media (max-width: 600px) {
    .hero-btns {
        flex-direction: column;
    }

    .selection-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }

    .selection-actions span {
        margin-right: 0;
    }
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.option-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (max-width: 600px) {
    .user-menu span:not(#creditDisplay) {
        display: none;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }

    .options-grid {
        gap: 1rem;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 400px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

.option-item label:first-child {
    font-size: 0.85rem;
    color: var(--text-muted);
}

input[type="number"],
select {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

select option {
    background: var(--bg-dark);
    color: white;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* --- PREMIUM BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    text-decoration: none;
    user-select: none;
}

.btn-lg {
    padding: 1.1rem 2rem;
    font-size: 1.1rem;
    border-radius: 14px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Primary Button (Main Actions) */
.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.5);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

/* Secondary Button (Glass Style) */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Warning & Danger (Gradients) */
.btn-warning {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ff5555 0%, #ff2222 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 85, 85, 0.2);
}

/* Outline Variants */
.btn-outline-primary {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
    border: 1px solid rgba(108, 92, 231, 0.3);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* Special Overhaul for Primary Button */
.primary-btn {
    width: fit-content;
    min-width: 320px;
    margin: 2rem auto 0;
    padding: 1rem 3rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe, #00cec9);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.4);
    position: relative;
    overflow: hidden;
}

.primary-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.5s;
    pointer-events: none;
}

.primary-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.6);
}

.primary-btn:hover::after {
    left: 100%;
}

.primary-btn:active {
    transform: translateY(-1px) scale(0.98);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Log Console */
.log-console {
    background: #000;
    border-radius: 8px;
    padding: 1rem;
    height: 200px;
    overflow-y: auto;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    color: #00ff9d;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 1.5rem;
}

.log-entry {
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 2px;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Helpers */
.hidden {
    display: none;
}

footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f1115;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .input-group input[type="text"] {
        width: 100%;
    }

    .input-group button.secondary-btn {
        width: 100%;
        padding: 1rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}

.variations-section {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

.style-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.premium-section-header {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(90deg, rgba(108, 92, 231, 0.2) 0%, transparent 100%);
    border-left: 4px solid var(--primary);
    border-radius: 4px 12px 12px 4px;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.premium-section-header i {
    color: var(--accent);
    filter: drop-shadow(0 0 5px var(--accent));
}

@media (max-width: 600px) {
    .style-group {
        padding: 1rem;
    }

    .premium-section-header {
        font-size: 0.95rem;
    }
}

.badge-info {
    background: rgba(0, 206, 201, 0.15);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 206, 201, 0.3);
}

.score-badge {
    display: inline-block;
    min-width: 60px;
}

/* --- PREMIUM VARIATIONS UI --- */
.variations-section {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .styles-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 400px) {
    .styles-grid {
        grid-template-columns: 1fr;
    }
}

.style-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
}

.style-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 20px rgba(108, 92, 231, 0.15);
}

.style-item.active {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.12);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.3), inset 0 0 15px rgba(108, 92, 231, 0.1);
    border-width: 2px;
}

.style-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(45deg, #000 30%, #111 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

/* Add a subtle scanline effect to previews */
.style-preview::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.style-info {
    padding: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.style-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.style-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    opacity: 0;
    transform: scale(0.5) rotate(-45deg);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 15px var(--primary);
    z-index: 2;
}

.style-item.active .style-check {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Staggered entry animation for items */
.style-item {
    opacity: 0;
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- CAPTION ANIMATIONS --- */
.animate-karaoke {
    color: #ffffff;
    /* Fallback for older browsers */
    background: linear-gradient(90deg, var(--sec-color, #ffff00) 50%, var(--prim-color, #ffffff) 50%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: anime-karaoke 2s linear infinite;
    display: inline-block;
    font-weight: 900;
    /* Removed drop-shadow to fix blurriness */
}

@keyframes anime-karaoke {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0% 0;
    }
}

.animate-seamless_bounce {
    animation: anime-bounce 0.6s infinite ease-in-out alternate;
}

@keyframes anime-bounce {
    from {
        transform: scale(0.95);
    }

    to {
        transform: scale(1.1);
    }
}

.animate-popline {
    animation: anime-pop 0.8s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes anime-pop {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.animate-glitch_infinite {
    animation: anime-glitch 0.3s infinite;
}

@keyframes anime-glitch {
    0% {
        transform: translate(0);
        text-shadow: 2px 2px #ff0000, -2px -2px #0000ff;
    }

    25% {
        transform: translate(2px, -2px);
        text-shadow: -2px 2px #ff0000, 2px -2px #0000ff;
    }

    50% {
        transform: translate(-2px, 2px);
        text-shadow: 2px -2px #ff0000, -2px 2px #0000ff;
    }

    75% {
        transform: translate(2px, 2px);
        text-shadow: -2px -2px #ff0000, 2px 2px #0000ff;
    }

    100% {
        transform: translate(0);
    }
}

.animate-beasty {
    animation: anime-shake 0.2s infinite;
}

@keyframes anime-shake {
    0% {
        transform: rotate(-1deg);
    }

    50% {
        transform: rotate(1deg);
    }

    100% {
        transform: rotate(-1deg);
    }
}

.animate-mozi {
    animation: anime-blink 1s infinite;
}

@keyframes anime-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- CLIPS GRID & CARDS --- */
.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Ensure Recent Section doesn't squash its internal table container */
.recent-section .clips-grid {
    display: block;
}

@media (max-width: 600px) {
    .clips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.clip-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.clip-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.clip-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Modals Refinement */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

@media (max-width: 600px) {
    .modal-content {
        padding: 1rem;
        border-radius: 12px;
    }
}

/* Video Preview Modal Specific */
#videoPreviewModal .modal-content {
    max-width: 90vh;
    padding: 0;
    background: #000;
}

/* Selection Actions Refinement */
.selection-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
    color: #ff5555;
}


/* --- UTILITY LINKS --- */
.footer-utils {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-bottom: 0.5rem;
}

.telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #0088cc 0%, #24A1DE 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.telegram-link i {
    font-size: 1.1rem;
}

.telegram-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.5);
    filter: brightness(1.1);
}

.telegram-link:active {
    transform: translateY(0) scale(0.98);
}

@media (max-width: 600px) {
    .footer-utils {
        justify-content: center;
    }
}

/* --- SECTION HEADERS --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    margin-bottom: 0 !important;
    /* Force override */
}

/* Badge Info Style */
.badge-info {
    background: rgba(0, 206, 201, 0.1);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 206, 201, 0.2);
    box-shadow: 0 4px 12px rgba(0, 206, 201, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
}

.badge-info::before {
    content: '\f058';
    /* FontAwesome Check Circle */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}