/*
Theme Name: InSnoop
Theme URI: https://example.com
Author: InSnoop Team
Description: Custom theme for InSnoop Instagram Viewer with Blog support.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --primary: #833ab4;
    --secondary: #fd1d1d;
    --accent-cyan: #00f2fe;
    --accent-purple: #9d50bb;
    --bg-dark: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --gradient: linear-gradient(45deg, var(--accent-purple), var(--accent-cyan));
    --insta-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
.logo {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: white;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: move 20s infinite alternate;
}

.blob-1 {
    background: var(--accent-purple);
    top: -100px;
    right: -100px;
}

.blob-2 {
    background: var(--accent-cyan);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(100px, 100px) scale(1.1);
    }
}

/* Navbar */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-snap {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links li {
    display: inline-block;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links .current-menu-item>a {
    color: white;
}

/* Hero Section & App Specifics */
.hero-section {
    padding: 100px 0 60px;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Search Box */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 10px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s, box-shadow 0.3s;
    align-items: center; /* ADD THIS */
}

.at-symbol {
    display: flex;
    align-items: center;
    padding-left: 20px;
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 1.2rem;
    flex-shrink: 0; /* ADD THIS - prevents @ from shrinking */
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 15px;
    color: white;
    font-size: 1.1rem;
    outline: none;
    min-width: 0; /* ADD THIS - allows input to shrink properly */
}

#search-btn {
    background: var(--gradient);
    border: none;
    padding: 0 30px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center; /* ADD THIS */
    gap: 10px;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0; /* ADD THIS - prevents button from shrinking */
    height: 40px; /* ADD THIS - fixed height */
}

#search-btn:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Loading & Error */
.loading-container,
.error-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-container {
    color: #ff4b2b;
    background: rgba(255, 75, 43, 0.1);
    padding: 15px 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 75, 43, 0.2);
}

/* Glass Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px;
}

.glass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 60px 0;
}

.info-card {
    text-align: center;
    transition: transform 0.3s;
}

.info-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
}

.gradient-icon {
    font-size: 2.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

/* Viewer Section */
.viewer-section {
    padding: 40px 0;
    max-width: 500px;
    margin: 0 auto;
}

.viewer-card {
    padding: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.viewer-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    object-fit: cover;
}

.user-info h3 {
    font-size: 1rem;
    margin: 0;
}

.user-info p {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.btn-icon {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.btn-icon:hover {
    opacity: 1;
}

.story-display {
    position: relative;
    aspect-ratio: 9 / 16;
    background: #000;
    display: flex;
    flex-direction: column;
}

.progress-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    flex: 1;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    width: 0%;
}

.media-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.media-container img,
.media-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}

.media-container:hover .nav-btn {
    opacity: 1;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.story-controls {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.quality-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 1px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.btn-download {
    background: white;
    color: black;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-download:hover {
    background: var(--accent-cyan);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* WP SPECIFIC: BLOG Styling */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.blog-title a {
    color: white;
}

.blog-meta {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 15px;
}

.blog-excerpt {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-read {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Single Post */
.single-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #e0e0e0;
}

.post-content h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: white;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}

.footer {
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    margin-top: 80px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
}

.copyright {
    color: var(--text-dim);
    margin-bottom: 20px;
}

/* Responsive Design (Mobile) */
@media (max-width: 768px) {
    .navbar {
        padding: 0 10px;
    }

    .hero-title {
        font-size: 2.5rem;
        padding: 0 10px;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 20px;
    }

    .search-container {
        padding: 0 15px; /* Add padding to container */
    }

    .input-group {
        width: 100%; /* Change from 90% to 100% */
        margin: 0 auto;
        padding: 5px 5px 5px 10px; /* Reduce padding */
    }

    .at-symbol {
        padding-left: 10px; /* Reduce from 20px */
        font-size: 1rem; /* Slightly smaller */
    }

    .input-group input {
        padding: 10px 8px; /* Reduce horizontal padding */
        font-size: 1rem; /* Slightly smaller */
    }

    #search-btn {
        padding: 0 15px; /* Reduce from 20px */
        min-width: 45px; /* Ensure icon has space */
    }

    #search-btn span {
        display: none; /* Hide 'Search' text on mobile */
    }

    .glass-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .single-post-container {
        padding: 30px 15px;
    }

    .post-title {
        font-size: 1.8rem;
    }
}