/* === Base & Resets === */
:root {
    --bg-dark: #050505;
    --card-bg: rgba(20, 20, 25, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #a0a0ab;
    
    --primary-color: #ff2a5f;
    --secondary-color: #00f0ff;
    --success-color: #2e7d32; /* Green for download buttons like y2mate */
    --success-hover: #1b5e20;
    
    --primary-grad: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.2);
    
    --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* === Splash Screen === */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    animation: scalePulse 2.5s ease-in-out forwards;
}

.splash-loader {
    width: 60px;
    height: 60px;
    border: 4px solid transparent;
    border-radius: 50%;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    animation: spin 1s linear infinite;
}

@keyframes scalePulse {
    0% { transform: scale(0.9); opacity: 0; }
    20% { transform: scale(1); opacity: 1; }
    80% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1.1); opacity: 0; }
}

/* === Cinematic Background === */
.cinematic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.light {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: moveLight 25s infinite ease-in-out alternate;
}

.light-1 {
    width: 50vw;
    height: 50vw;
    background: var(--primary-color);
    top: -10%;
    left: -10%;
}

.light-2 {
    width: 40vw;
    height: 40vw;
    background: var(--secondary-color);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 30s;
}

.light-3 {
    width: 30vw;
    height: 30vw;
    background: #6a00ff;
    top: 40%;
    left: 40%;
    animation-delay: -15s;
    opacity: 0.2;
}

@keyframes moveLight {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5vw, 10vh) scale(1.2); }
    100% { transform: translate(-5vw, -5vh) scale(0.8); }
}

/* === Layout === */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    z-index: 1;
}

/* === Header === */
.header {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

.glow-text {
    font-family: 'Syncopate', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 42, 95, 0.5), 0 0 40px rgba(0, 240, 255, 0.3);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* === Search Section === */
.search-section {
    width: 100%;
    max-width: 700px;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 42, 95, 0.3), 0 10px 30px rgba(0,0,0,0.5);
}

.input-wrapper .icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

input[type="url"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    padding: 0 1rem;
    width: 100%;
}

input[type="url"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#search-btn {
    background: var(--primary-grad);
    border: none;
    outline: none;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

#search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 42, 95, 0.6);
}

.terms-notice {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.terms-notice a { color: var(--primary-color); text-decoration: none; }

.error-message {
    margin-top: 1rem;
    color: #ff2a5f;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    padding-left: 2rem;
    animation: fadeIn 0.3s;
}

/* === Loading State === */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 3rem 0;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Results Section (3D Tilt) === */
.results-section {
    width: 100%;
    perspective: 1000px;
    animation: fadeInUp 0.8s ease-out;
    margin-bottom: 4rem;
}

.tilt-container {
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.glass-card {
    background: linear-gradient(145deg, rgba(30, 30, 35, 0.6), rgba(15, 15, 20, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.result-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transform: translateZ(30px);
}

@media (min-width: 768px) {
    .result-card {
        flex-direction: row;
        align-items: stretch;
    }
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 auto;
    background-color: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translateZ(50px);
    display: flex;
    flex-direction: column;
}

.thumbnail-wrapper img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.duration-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
}

.thumbnail-title {
    font-size: 1.1rem;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    background: #111;
    margin: 0;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 3.5rem);
    background: rgba(var(--primary-color), 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.play-overlay i {
    font-size: 4rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 0.5rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    transform: scale(0.5);
    transition: var(--transition);
}

.thumbnail-wrapper:hover img {
    transform: scale(1.1);
}
.thumbnail-wrapper:hover .play-overlay {
    background: rgba(0,0,0,0.4);
    opacity: 1;
}
.thumbnail-wrapper:hover .play-overlay i {
    transform: scale(1);
}

/* === Tabs & Table Layout === */
.info-wrapper {
    flex: 1;
    transform: translateZ(40px);
    display: flex;
    flex-direction: column;
}

.tabs-container {
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    outline: none;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.tab-btn.active {
    color: var(--primary-color);
    background: rgba(255, 42, 95, 0.1);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* Custom Scrollbar for tables */
.tab-content::-webkit-scrollbar {
    width: 6px;
}
.tab-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.tab-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.table-responsive {
    width: 100%;
}

.quality-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.quality-table th {
    background: rgba(0,0,0,0.5);
    padding: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
    z-index: 2;
}

.quality-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}

.quality-table tr:hover {
    background: rgba(255,255,255,0.03);
}

.format-txt {
    color: var(--text-secondary);
}

.download-row-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.download-row-btn:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.4);
}

/* === Info Section === */
.info-section {
    width: 100%;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.info-card {
    background: rgba(15, 15, 20, 0.5);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

.info-card h2 {
    font-family: 'Syncopate', sans-serif;
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.info-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    margin: 2rem 0;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.info-block h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info-block ol, .info-block ul {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    line-height: 1.8;
}

.info-block li {
    margin-bottom: 0.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature-item h4 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-item p {
    font-size: 0.9rem;
    margin: 0;
}

.tips-box {
    background: rgba(0, 240, 255, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    color: #b3fcff;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.tips-box strong { color: white; }

.guidelines h4 {
    color: white;
    margin-bottom: 1rem;
}

.guidelines p {
    text-align: left;
    margin-bottom: 0.5rem;
}

/* === Modal Styling === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.4s ease-out;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.4rem;
    font-family: 'Syncopate', sans-serif;
    text-transform: uppercase;
}

.modal-header i { color: var(--secondary-color); font-size: 1.8rem; }

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover { color: var(--primary-color); transform: rotate(90deg); }

.modal-body { margin-bottom: 2rem; }

.download-details {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.download-details p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.download-details p:last-child { margin-bottom: 0; }
.download-details strong { color: var(--text-primary); }

.modal-warning {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 42, 95, 0.1);
    border-left: 4px solid var(--primary-color);
    color: #ffb3c6;
    font-size: 0.9rem;
    line-height: 1.4;
    border-radius: 0 8px 8px 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-btn {
    padding: 1rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.cancel-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.cancel-btn:hover { background: rgba(255, 255, 255, 0.1); color: white; }

.proceed-btn {
    background: var(--primary-grad);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proceed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 42, 95, 0.4);
}
.proceed-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }

/* === Footer === */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    z-index: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    width: 100%;
}

.footer-links { margin: 1rem 0; }
.footer-links a { color: var(--text-secondary); text-decoration: none; margin: 0 0.5rem; transition: color 0.3s; }
.footer-links a:hover { color: white; }

/* === Progress Bar UI === */
.progress-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    animation: fadeIn 0.4s;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.progress-fill {
    height: 100%;
    background: var(--primary-grad);
    border-radius: 10px;
    transition: width 0.3s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

#progress-percent {
    color: var(--secondary-color);
    font-weight: 700;
}

.progress-status-text {
    text-align: center;
    font-size: 0.9rem;
    color: white;
    font-style: italic;
}

/* === Utility Classes === */
.hidden { display: none !important; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .glow-text { font-size: 2.5rem; }
    .input-wrapper { flex-direction: column; border-radius: 20px; padding: 1rem; gap: 1rem; }
    .input-wrapper .icon { display: none; }
    input[type="url"] { text-align: center; }
    #search-btn { width: 100%; justify-content: center; }
    .info-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .info-card { padding: 1.5rem; }
}

/* Colorful Enhancements */
@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.rainbow-text {
    background: linear-gradient(270deg, #ff007f, #7f00ff, #00ffff, #ff007f);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    animation: gradient-flow 6s ease infinite;
}

.premium-text {
    background: linear-gradient(270deg, #ff4d4d, #f9cb28, #ff4d4d);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    animation: gradient-flow 4s ease infinite;
}

.main-title {
    background: linear-gradient(270deg, #ff2a5f, #00f0ff, #ff2a5f);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 5s ease infinite;
    text-shadow: 0 0 20px rgba(255, 42, 95, 0.4);
}

.btn-text, .icon {
    animation: gradient-flow 3s ease infinite;
}

/* Responsive Table Fixes */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 10px;
}
.quality-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
    min-width: 400px;
}
.quality-table th, .quality-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.quality-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.quality-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
.download-row-btn {
    background: var(--primary-grad);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.download-row-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 42, 95, 0.4);
}

/* =====================================================
   INSTAGRAM / PLATFORM TOGGLE STYLES
   ===================================================== */

.platform-toggle {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.25rem;
    animation: fadeInDown 0.6s ease-out;
}

.platform-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.8rem;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.platform-btn i {
    font-size: 1.3rem;
}

.platform-btn:hover {
    background: rgba(255,255,255,0.07);
    color: white;
}

/* YouTube active */
#yt-platform-btn.active {
    background: rgba(255, 0, 0, 0.15);
    border-color: #ff0000;
    color: #ff4444;
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.2);
}

/* Instagram active — gradient border effect */
#insta-platform-btn.active {
    background: rgba(193, 53, 132, 0.12);
    border-color: #c13584;
    color: #e1306c;
    box-shadow: 0 0 18px rgba(225, 48, 108, 0.25);
}

/* Instagram reel badge on thumbnail */
.insta-reel-badge {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    z-index: 2;
    letter-spacing: 0.5px;
}

.insta-reel-badge i {
    font-size: 1rem;
}

/* Placeholder when no Instagram thumbnail available */
#insta-thumbnail[src=""] {
    display: none;
}

.insta-no-thumb {
    width: 100%;
    aspect-ratio: 9/16;
    max-height: 220px;
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 12px 0 0;
}

.insta-no-thumb i {
    font-size: 4rem;
    color: rgba(255,255,255,0.8);
}

/* Instagram tab active colour */
#insta-results-section .tab-btn.active {
    color: #e1306c;
    background: rgba(225, 48, 108, 0.1);
    border-bottom: 2px solid #e1306c;
}

/* Instagram download button — gradient brand colours */
#insta-results-section .download-row-btn {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    background-size: 200% 200%;
    animation: gradient-flow 4s ease infinite;
}

#insta-results-section .download-row-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(225, 48, 108, 0.5);
}

@media (max-width: 600px) {
    .platform-toggle {
        flex-direction: column;
        align-items: stretch;
    }
    .platform-btn {
        justify-content: center;
    }
}