@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
        
        .reddit-explorer-wrapper * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .reddit-explorer-wrapper {
            font-family: 'Space Grotesk', sans-serif;
            background: #0f172a;
            color: #e2e8f0;
            line-height: 1.6;
            overflow-x: hidden;
            min-height: 100vh;
        }

        :root {
            --primary-color: #22d3ee;
            --primary-light: #67e8f9;
            --primary-dark: #0891b2;
            --secondary-color: #a855f7;
            --secondary-light: #c084fc;
            --secondary-dark: #7e22ce;
            --accent-color: #f59e0b;
            --accent-light: #fbbf24;
            --accent-dark: #d97706;
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-tertiary: #334155;
            --bg-card: #1e293b;
            --glass-bg: rgba(34, 211, 238, 0.1);
            --glass-border: rgba(34, 211, 238, 0.2);
            --text-primary: #e2e8f0;
            --text-secondary: #cbd5e1;
            --text-muted: #94a3b8;
            --text-accent: #67e8f9;
            --shadow-sm: 0 2px 8px rgba(34, 211, 238, 0.1);
            --shadow-md: 0 4px 16px rgba(34, 211, 238, 0.15);
            --shadow-lg: 0 8px 32px rgba(34, 211, 238, 0.2);
            --shadow-xl: 0 16px 48px rgba(34, 211, 238, 0.25);
            --gradient-primary: linear-gradient(135deg, #22d3ee, #0891b2);
            --gradient-secondary: linear-gradient(135deg, #a855f7, #7e22ce);
            --gradient-accent: linear-gradient(135deg, #f59e0b, #d97706);
        }

        .reddit-explorer-main {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
        }

        .reddit-explorer-top-section {
            text-align: center;
            margin-bottom: 50px;
            padding: 40px 0;
            animation: fadeInDown 1s ease-out;
        }

        .reddit-explorer-brand {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            margin-bottom: 25px;
            flex-wrap: wrap;
        }

        .reddit-explorer-icon {
            width: 80px;
            height: 80px;
            background: var(--gradient-primary);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 36px;
            font-weight: 800;
            box-shadow: var(--shadow-lg);
            animation: float 3s ease-in-out infinite;
            position: relative;
            overflow: hidden;
        }

        .reddit-explorer-icon::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transform: rotate(45deg);
            animation: shine 3s infinite;
        }

        .reddit-explorer-tag {
            background: var(--gradient-secondary);
            color: white;
            padding: 8px 16px;
            border-radius: 25px;
            font-size: 14px;
            font-weight: 700;
            box-shadow: var(--shadow-md);
            animation: pulse 2s infinite;
        }

        .reddit-explorer-name {
            font-size: clamp(2.5rem, 6vw, 4rem);
            font-weight: 900;
            background: var(--gradient-primary);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            letter-spacing: -1px;
            text-shadow: 0 0 30px rgba(34, 211, 238, 0.5);
        }

        .reddit-explorer-description {
            color: var(--text-secondary);
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 30px;
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
        }

        .reddit-explorer-features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }

        .reddit-explorer-feature {
            background: var(--bg-card);
            border: 1px solid var(--glass-border);
            padding: 15px;
            border-radius: 16px;
            text-align: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .reddit-explorer-feature::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.1), transparent);
            transition: left 0.5s;
        }

        .reddit-explorer-feature:hover::before {
            left: 100%;
        }

        .reddit-explorer-feature:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-lg);
            border-color: var(--primary-color);
        }

        .reddit-explorer-feature-icon {
            width: 40px;
            height: 40px;
            background: var(--gradient-primary);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 10px;
            font-size: 20px;
            color: white;
        }

        .reddit-explorer-feature-label {
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
            font-size: 14px;
        }

        .reddit-explorer-search-box {
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            padding: 30px;
            border-radius: 24px;
            box-shadow: var(--shadow-xl);
            margin-bottom: 40px;
            animation: fadeInUp 1s ease-out 0.2s both;
            position: relative;
            overflow: hidden;
        }

        .reddit-explorer-search-box::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--gradient-primary);
        }

        .reddit-explorer-search-form {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            position: relative;
        }

        .reddit-explorer-input {
            flex: 1 !important;
            padding: 15px 20px !important;
            border: 2px solid var(--bg-tertiary) !important;
            border-radius: 16px !important;
            font-size: 14px !important;
            font-weight: 500 !important;
            background: var(--bg-primary) !important;
            transition: all 0.3s ease !important;
            outline: none !important;
            color: var(--text-primary) !important;
            font-family: inherit !important;
        }

        .reddit-explorer-input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
            transform: translateY(-2px);
        }

        .reddit-explorer-input::placeholder {
            color: var(--text-muted);
            font-weight: 400;
        }

        .reddit-explorer-button {
            padding: 15px 30px;
            background: var(--gradient-primary);
            color: white;
            border: none;
            border-radius: 16px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 150px;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-md);
            font-family: inherit;
        }

        .reddit-explorer-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .reddit-explorer-button:hover::before {
            left: 100%;
        }

        .reddit-explorer-button:hover:not(:disabled) {
            transform: translateY(-3px);
            box-shadow: var(--shadow-lg);
        }

        .reddit-explorer-button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .reddit-explorer-user-panel {
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            padding: 30px;
            border-radius: 24px;
            box-shadow: var(--shadow-xl);
            margin-bottom: 40px;
            display: none;
            animation: fadeInDown 0.8s ease-out;
            position: relative;
            overflow: hidden;
        }

        .reddit-explorer-user-panel::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--gradient-secondary);
        }

        .reddit-explorer-user-header {
            display: flex;
            align-items: center;
            gap: 25px;
            margin-bottom: 25px;
        }

        .reddit-explorer-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: var(--gradient-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.5rem;
            color: white;
            font-weight: 900;
            box-shadow: var(--shadow-lg);
            position: relative;
            overflow: hidden;
        }

        .reddit-explorer-avatar::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transform: rotate(45deg);
            animation: shine 4s infinite;
        }

        .reddit-explorer-user-info .reddit-explorer-name {
            font-size: 2rem;
            color: var(--text-primary);
            margin-bottom: 8px;
            font-weight: 900;
        }

        .reddit-explorer-user-bio {
            color: var(--text-secondary);
            font-size: 16px;
            font-weight: 500;
        }

        .reddit-explorer-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 20px;
            margin-top: 25px;
        }

        .reddit-explorer-stat {
            background: var(--bg-card);
            border: 1px solid var(--glass-border);
            padding: 20px;
            border-radius: 20px;
            text-align: center;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .reddit-explorer-stat::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--gradient-accent);
        }

        .reddit-explorer-stat:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-md);
        }

        .reddit-explorer-stat-value {
            font-size: 1.8rem;
            font-weight: 900;
            color: var(--primary-color);
            margin-bottom: 6px;
        }

        .reddit-explorer-stat-key {
            font-size: 0.9rem;
            color: var(--text-secondary);
            font-weight: 600;
        }

        .reddit-explorer-content-area {
            display: none;
        }

        .reddit-explorer-section-heading {
            color: var(--text-primary);
            font-size: 2rem;
            font-weight: 900;
            margin-bottom: 30px;
            text-align: center;
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            padding: 20px;
            border-radius: 20px;
            position: relative;
            overflow: hidden;
        }

        .reddit-explorer-section-heading::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--gradient-accent);
        }

        .reddit-explorer-posts {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
            gap: 25px;
        }

        .reddit-explorer-post {
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            border-radius: 20px;
            padding: 20px;
            box-shadow: var(--shadow-xl);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            animation: slideUp 0.6s ease forwards;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .reddit-explorer-post::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--gradient-primary);
            border-radius: 20px 20px 0 0;
        }

        .reddit-explorer-post:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(34, 211, 238, 0.2);
            border-color: var(--primary-color);
        }

        .reddit-explorer-post-meta {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 2px solid var(--bg-tertiary);
        }

        .reddit-explorer-subreddit {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .reddit-explorer-subreddit-tag {
            background: var(--gradient-primary);
            color: white;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 700;
            box-shadow: var(--shadow-sm);
        }

        .reddit-explorer-type {
            background: var(--gradient-secondary);
            color: white;
            padding: 4px 10px;
            border-radius: 15px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: capitalize;
        }

        .reddit-explorer-date {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-weight: 500;
            text-align: right;
        }

        .reddit-explorer-labels {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 15px;
        }

        .reddit-explorer-label {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: 600;
            color: white;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .reddit-explorer-label.admin {
            background: var(--gradient-accent);
        }

        .reddit-explorer-label.stickied {
            background: var(--gradient-secondary);
        }

        .reddit-explorer-label.archived {
            background: linear-gradient(135deg, #64748b, #475569);
        }

        .reddit-explorer-label.locked {
            background: var(--gradient-accent);
        }

        .reddit-explorer-label.nsfw {
            background: linear-gradient(135deg, #7c3aed, #5b21b6);
        }

        .reddit-explorer-post-title {
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 15px;
            color: var(--text-primary);
            line-height: 1.4;
        }

        .reddit-explorer-post-body {
            margin-bottom: 20px;
            flex-grow: 1;
        }

        .reddit-explorer-text {
            color: var(--text-secondary);
            line-height: 1.6;
            margin-bottom: 15px;
            font-weight: 400;
            font-size: 14px;
        }

        .reddit-explorer-media {
            margin: 15px 0;
            border-radius: 16px;
            overflow: hidden;
            position: relative;
            box-shadow: var(--shadow-md);
            background: #000;
        }

        .reddit-explorer-image {
            width: 100%;
            max-height: 300px;
            object-fit: cover;
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .reddit-explorer-image:hover {
            transform: scale(1.02);
        }

        .reddit-explorer-video-wrapper {
            position: relative;
            width: 100%;
            background: #000;
            border-radius: 16px;
            overflow: hidden;
        }

        .reddit-explorer-video {
            width: 100%;
            height: 250px;
            border-radius: 16px;
        }

        .reddit-explorer-controls {
            display: flex;
            gap: 10px;
            margin-top: 15px;
            flex-wrap: wrap;
            align-items: center;
        }

        .reddit-explorer-control {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 18px;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 600;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-family: inherit;
            position: relative;
            overflow: hidden;
        }

        .reddit-explorer-control::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s;
        }

        .reddit-explorer-control:hover::before {
            left: 100%;
        }

        .reddit-explorer-audio-btn {
            background: var(--gradient-secondary);
            color: white;
            box-shadow: var(--shadow-md);
        }

        .reddit-explorer-audio-btn:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-lg);
        }

        .reddit-explorer-audio-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .reddit-explorer-audio-btn.loading {
            background: linear-gradient(135deg, #64748b, #475569);
        }

        .reddit-explorer-download {
            background: var(--gradient-accent);
            color: white;
            box-shadow: var(--shadow-md);
        }

        .reddit-explorer-download:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-lg);
        }

        .reddit-explorer-download:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .reddit-explorer-download.downloading {
            background: var(--gradient-primary);
        }

        .reddit-explorer-external {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--gradient-primary);
            color: white;
            padding: 10px 18px;
            border-radius: 12px;
            text-decoration: none;
            margin-top: 15px;
            transition: all 0.3s ease;
            font-weight: 600;
            box-shadow: var(--shadow-sm);
            font-size: 0.9rem;
        }

        .reddit-explorer-external:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
        }

        .reddit-explorer-metrics {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-top: auto;
            padding-top: 15px;
            border-top: 2px solid var(--bg-tertiary);
        }

        .reddit-explorer-metric {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 12px;
            background: var(--bg-card);
            border: 1px solid var(--glass-border);
            border-radius: 15px;
            text-align: center;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .reddit-explorer-metric::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--gradient-accent);
        }

        .reddit-explorer-metric:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-sm);
        }

        .reddit-explorer-metric-value {
            font-weight: 900;
            font-size: 1.2rem;
        }

        .reddit-explorer-metric-label {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-weight: 600;
            text-transform: capitalize;
        }

        .reddit-explorer-upvotes .reddit-explorer-metric-value {
            color: var(--primary-color);
        }

        .reddit-explorer-comments .reddit-explorer-metric-value {
            color: var(--secondary-color);
        }

        .reddit-explorer-loader {
            text-align: center;
            padding: 40px;
            color: var(--text-primary);
            font-size: 1.1rem;
            display: none;
        }

        .reddit-explorer-spinner {
            border: 4px solid var(--bg-tertiary);
            border-top: 4px solid var(--primary-color);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }

        .reddit-explorer-error {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.2);
            color: #ef4444;
            padding: 20px;
            border-radius: 16px;
            text-align: center;
            margin: 20px 0;
            font-weight: 600;
            display: none;
            font-size: 14px;
        }

        .reddit-explorer-popup {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.95);
            animation: fadeIn 0.3s ease;
        }

        .reddit-explorer-popup-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            max-width: 90%;
            max-height: 90%;
        }

        .reddit-explorer-popup img {
            width: 100%;
            height: auto;
            border-radius: 20px;
        }

        .reddit-explorer-close {
            position: absolute;
            top: 20px;
            right: 40px;
            color: #f1f1f1;
            font-size: 45px;
            font-weight: bold;
            cursor: pointer;
            z-index: 1001;
        }

        .reddit-explorer-close:hover {
            color: var(--primary-color);
        }

        .reddit-explorer-progress {
            position: fixed;
            bottom: 25px;
            right: 25px;
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            border-radius: 20px;
            padding: 25px;
            min-width: 350px;
            box-shadow: var(--shadow-xl);
            z-index: 1000;
            display: none;
            color: var(--text-primary);
        }

        .reddit-explorer-progress.show {
            display: block;
            animation: slideInRight 0.4s ease-out;
        }

        .reddit-explorer-progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .reddit-explorer-progress-text {
            font-weight: 700;
            font-size: 14px;
            color: var(--text-primary);
        }

        .reddit-explorer-cancel {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.2);
            color: #ef4444;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .reddit-explorer-cancel:hover {
            background: rgba(239, 68, 68, 0.15);
        }

        .reddit-explorer-progress-bar {
            width: 100%;
            height: 12px;
            background: var(--bg-tertiary);
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 12px;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .reddit-explorer-progress-fill {
            height: 100%;
            background: var(--gradient-primary);
            border-radius: 6px;
            width: 0%;
            transition: width 0.3s ease;
            box-shadow: 0 2px 8px rgba(34, 211, 238, 0.4);
        }

        .reddit-explorer-progress-info {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .reddit-explorer-expand {
            background: var(--gradient-primary);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 600;
            margin-top: 10px;
            transition: all 0.3s ease;
            font-family: inherit;
        }

        .reddit-explorer-expand:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-sm);
        }

        .reddit-explorer-play-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(0, 0, 0, 0.7);
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            color: white;
            font-size: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            z-index: 5;
        }

        .reddit-explorer-play-overlay:hover {
            background: rgba(0, 0, 0, 0.9);
            transform: translate(-50%, -50%) scale(1.1);
        }

        .reddit-explorer-play-overlay.hidden {
            display: none;
        }

        .reddit-explorer-new-search {
            background: var(--gradient-accent) !important;
            min-width: 130px;
        }

        @keyframes float {
            0%, 100% {
                transform: translateY(0px) scale(1);
            }
            50% {
                transform: translateY(-10px) scale(1.02);
            }
        }

        @keyframes shine {
            0% {
                transform: translateX(-100%) translateY(-100%) rotate(45deg);
            }
            100% {
                transform: translateX(100%) translateY(100%) rotate(45deg);
            }
        }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(100%);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(40px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }

        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.05);
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .reddit-explorer-loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            color: white;
            font-weight: 600;
            z-index: 10;
        }

        .reddit-explorer-loading-spinner {
            width: 30px;
            height: 30px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-top: 3px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 10px;
        }

        /* Responsive Design */
        @media (max-width: 1200px) {
            .reddit-explorer-posts {
                grid-template-columns: 1fr;
            }
            .reddit-explorer-features {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 992px) {
            .reddit-explorer-name {
                font-size: 2.5rem;
            }
            .reddit-explorer-section-heading {
                font-size: 1.8rem;
            }
            .reddit-explorer-post-title {
                font-size: 1.2rem;
            }
            .reddit-explorer-search-form {
                flex-direction: column !important;
            }
        }

        @media (max-width: 768px) {
            .reddit-explorer-features {
                grid-template-columns: 1fr;
            }
            .reddit-explorer-stats {
                grid-template-columns: repeat(2, 1fr);
            }
            .reddit-explorer-metrics {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }
            .reddit-explorer-controls {
                flex-direction: column;
            }
            .reddit-explorer-control {
                width: 100%;
                justify-content: center;
            }
            .reddit-explorer-search-form {
                flex-direction: column;
            }
            .reddit-explorer-name {
                font-size: 2rem;
            }
            .reddit-explorer-description {
                font-size: 16px;
            }
            .reddit-explorer-section-heading {
                font-size: 1.6rem;
            }
            .reddit-explorer-post-title {
                font-size: 1.1rem;
            }
					.reddit-explorer-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 25px;
	flex-wrap: wrap;
	margin-top: 30px;
}
        }

        @media (max-width: 600px) {
            .reddit-explorer-main {
                padding: 15px;
            }
            .reddit-explorer-search-box,
            .reddit-explorer-user-panel,
            .reddit-explorer-post {
                padding: 20px;
            }
            .reddit-explorer-posts {
                grid-template-columns: 1fr;
            }
            .reddit-explorer-icon {
                width: 60px;
                height: 60px;
                font-size: 28px;
            }
            .reddit-explorer-avatar {
                width: 60px;
                height: 60px;
                font-size: 2rem;
            }
            .reddit-explorer-name {
                font-size: 1.8rem;
            }
            .reddit-explorer-description {
                font-size: 14px;
            }
            .reddit-explorer-section-heading {
                font-size: 1.4rem;
            }
            .reddit-explorer-post-title {
                font-size: 1rem;
            }
					.reddit-explorer-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 25px;
	flex-wrap: wrap;
	margin-top: 30px;
}
        }

        @media (max-width: 480px) {
            .reddit-explorer-metrics {
                grid-template-columns: 1fr;
            }
            .reddit-explorer-stats {
                grid-template-columns: 1fr;
            }
            .reddit-explorer-main {
                padding: 10px;
            }
            .reddit-explorer-search-box,
            .reddit-explorer-user-panel,
            .reddit-explorer-post {
                padding: 15px;
            }
            .reddit-explorer-icon {
                width: 50px;
                height: 50px;
                font-size: 24px;
            }
            .reddit-explorer-avatar {
                width: 50px;
                height: 50px;
                font-size: 1.8rem;
            }
            .reddit-explorer-name {
                font-size: 1.6rem;
            }
            .reddit-explorer-description {
                font-size: 13px;
            }
            .reddit-explorer-section-heading {
                font-size: 1.2rem;
            }
            .reddit-explorer-post-title {
                font-size: 0.9rem;
            }
					.reddit-explorer-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 25px;
	flex-wrap: wrap;
	margin-top: 30px;
}
        }

        @media (max-width: 400px) {
            .reddit-explorer-main {
                padding: 8px;
            }
            .reddit-explorer-search-box,
            .reddit-explorer-user-panel,
            .reddit-explorer-post {
                padding: 12px;
            }
            .reddit-explorer-icon {
                width: 45px;
                height: 45px;
                font-size: 22px;
            }
            .reddit-explorer-avatar {
                width: 45px;
                height: 45px;
                font-size: 1.6rem;
            }
            .reddit-explorer-name {
                font-size: 1.4rem;
            }
            .reddit-explorer-description {
                font-size: 12px;
            }
            .reddit-explorer-section-heading {
                font-size: 1.1rem;
            }
            .reddit-explorer-post-title {
                font-size: 0.85rem;
            }
					.reddit-explorer-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 25px;
	flex-wrap: wrap;
	margin-top: 30px;
}
        }

        @media (max-width: 375px) {
            .reddit-explorer-main {
                padding: 5px;
            }
            .reddit-explorer-search-box,
            .reddit-explorer-user-panel,
            .reddit-explorer-post {
                padding: 10px;
            }
            .reddit-explorer-icon {
                width: 40px;
                height: 40px;
                font-size: 20px;
            }
            .reddit-explorer-avatar {
                width: 40px;
                height: 40px;
                font-size: 1.4rem;
            }
            .reddit-explorer-name {
                font-size: 1.2rem;
            }
            .reddit-explorer-description {
                font-size: 11px;
            }
            .reddit-explorer-section-heading {
                font-size: 1rem;
            }
            .reddit-explorer-post-title {
                font-size: 0.8rem;
            }
					.reddit-explorer-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 25px;
	flex-wrap: wrap;
	margin-top: 30px;
}
        }

/* --- Codex CSS updates --- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

.reddit-explorer-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.reddit-explorer-wrapper {
    font-family: 'Space Grotesk', Arial, sans-serif;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 69, 0, 0.22), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(34, 211, 238, 0.16), transparent 30%),
        linear-gradient(145deg, #070b14 0%, #101827 46%, #15111f 100%);
    color: #f8fafc;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

.reddit-explorer-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    pointer-events: none;
    opacity: 0.35;
    z-index: -1;
}

:root {
    --primary-color: #ff4500;
    --primary-light: #ff7a3d;
    --primary-dark: #c93600;
    --secondary-color: #22d3ee;
    --secondary-light: #67e8f9;
    --secondary-dark: #0891b2;
    --accent-color: #f59e0b;
    --accent-light: #fbbf24;
    --accent-dark: #d97706;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --bg-primary: #090d16;
    --bg-secondary: rgba(15, 23, 42, 0.82);
    --bg-tertiary: #273244;
    --bg-card: rgba(20, 31, 48, 0.78);
    --glass-bg: rgba(255, 255, 255, 0.075);
    --glass-border: rgba(226, 232, 240, 0.14);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent: #ffb199;
    --shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 16px 34px rgba(0, 0, 0, 0.24);
    --shadow-lg: 0 24px 52px rgba(0, 0, 0, 0.32);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.38);
    --gradient-primary: linear-gradient(135deg, #ff4500 0%, #ff7a3d 48%, #f59e0b 100%);
    --gradient-secondary: linear-gradient(135deg, #22d3ee 0%, #2563eb 52%, #7c3aed 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 55%, #ef4444 100%);
}

.reddit-explorer-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px 42px;
    position: relative;
}

.reddit-explorer-top-section {
    text-align: center;
    margin-bottom: 28px;
    padding: 26px 0 18px;
    animation: fadeInDown 0.75s ease-out;
}

.reddit-explorer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.reddit-explorer-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    font-weight: 800;
    box-shadow: var(--shadow-lg), 0 0 0 7px rgba(255, 69, 0, 0.08);
    animation: float 4s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.reddit-explorer-icon::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transform: rotate(45deg);
    animation: shine 4s infinite;
}

.reddit-explorer-tag {
    background: var(--gradient-secondary);
    color: white;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    animation: pulse 2.6s infinite;
}

.reddit-explorer-name {
    font-size: clamp(1.8rem, 3.1vw, 2.65rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #ffd6c7 42%, #ff7a3d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
    text-shadow: none;
    line-height: 1.18;
    max-width: 920px;
    text-transform: capitalize !important;
}

.reddit-explorer-description {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 22px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.reddit-explorer-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 34px;
}

.reddit-explorer-feature {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 18px 14px;
    border-radius: 18px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(14px);
}

.reddit-explorer-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    transition: left 0.55s ease;
}

.reddit-explorer-feature:hover::before {
    left: 110%;
}

.reddit-explorer-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 122, 61, 0.5);
    background: rgba(255, 255, 255, 0.095);
}

.reddit-explorer-feature-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 19px;
    color: white;
    box-shadow: 0 10px 24px rgba(255, 69, 0, 0.22);
}

.reddit-explorer-feature-label {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    font-size: 14px;
}

.reddit-explorer-search-box {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    padding: 26px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 30px;
    animation: fadeInUp 0.75s ease-out 0.15s both;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.reddit-explorer-search-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 999px;
}

.reddit-explorer-search-form {
    display: flex;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 18px;
    position: relative;
    width: 100%;
}

.reddit-explorer-input {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 56px !important;
    padding: 0 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.16) !important;
    border-radius: 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    background: rgba(7, 11, 20, 0.72) !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
    outline: none !important;
    color: var(--text-primary) !important;
    font-family: inherit !important;
    line-height: 52px !important;
    resize: none !important;
    overflow: hidden !important;
    appearance: none !important;
}

.reddit-explorer-input:focus {
    border-color: rgba(255, 122, 61, 0.85) !important;
    box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.16), 0 12px 30px rgba(0, 0, 0, 0.2) !important;
    background: rgba(9, 13, 22, 0.95) !important;
    transform: none;
}

.reddit-explorer-input::placeholder {
    color: #9ca8ba;
    font-weight: 400;
}

.reddit-explorer-button {
    min-height: 52px;
    height: 52px;
    padding: 0 24px;
    background: var(--gradient-primary);
    color: white;
    border: 0;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    min-width: 144px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(255, 69, 0, 0.26);
    font-family: inherit;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
}

.reddit-explorer-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent);
    transition: left 0.5s ease;
}

.reddit-explorer-button:hover::before {
    left: 110%;
}

.reddit-explorer-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(255, 69, 0, 0.34);
    filter: saturate(1.08);
}

.reddit-explorer-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(255, 69, 0, 0.24);
}

.reddit-explorer-button:focus-visible {
    outline: 3px solid rgba(255, 122, 61, 0.38);
    outline-offset: 3px;
}

.reddit-explorer-button:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
}

.reddit-explorer-user-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    padding: 26px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 34px;
    display: none;
    animation: fadeInDown 0.65s ease-out;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.reddit-explorer-user-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 999px;
}

.reddit-explorer-user-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.reddit-explorer-avatar {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    color: white;
    font-weight: 900;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.reddit-explorer-avatar::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: rotate(45deg);
    animation: shine 4.2s infinite;
}

.reddit-explorer-user-info {
    min-width: 0;
}

.reddit-explorer-user-info .reddit-explorer-name {
    font-size: 1.55rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 800;
    max-width: none;
}

.reddit-explorer-user-bio {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.reddit-explorer-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.reddit-explorer-stat {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 18px;
    border-radius: 18px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.reddit-explorer-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 999px;
}

.reddit-explorer-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(245, 158, 11, 0.45);
}

.reddit-explorer-stat-value {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-light);
    margin-bottom: 4px;
}

.reddit-explorer-stat-key {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.reddit-explorer-content-area {
    display: none;
}

.reddit-explorer-section-heading {
    color: var(--text-primary);
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 24px;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    padding: 18px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
}

.reddit-explorer-section-heading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 999px;
}

.reddit-explorer-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 22px;
}

.reddit-explorer-post {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.55s ease forwards;
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(18px);
}

.reddit-explorer-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 999px;
}

.reddit-explorer-post:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 122, 61, 0.5);
}

.reddit-explorer-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 15px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.12);
}

.reddit-explorer-subreddit {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    min-width: 0;
}

.reddit-explorer-subreddit-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.reddit-explorer-type {
    background: var(--gradient-secondary);
    color: white;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize !important;
}

.reddit-explorer-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

.reddit-explorer-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.reddit-explorer-label {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0;
}

.reddit-explorer-label.admin,
.admin {
    background: var(--gradient-accent);
}

.reddit-explorer-label.stickied,
.stickied {
    background: var(--gradient-secondary);
}

.reddit-explorer-label.archived,
.archived {
    background: linear-gradient(135deg, #64748b, #475569);
}

.reddit-explorer-label.locked,
.locked {
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.reddit-explorer-label.nsfw,
.nsfw {
    background: linear-gradient(135deg, #db2777, #7c3aed);
}

.reddit-explorer-post-title {
    font-size: 1.22rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-primary);
    line-height: 1.38;
}

.reddit-explorer-post-body {
    margin-bottom: 18px;
    flex-grow: 1;
}

.reddit-explorer-text {
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 14px;
    font-weight: 400;
    font-size: 14px;
}

.reddit-explorer-media {
    margin: 14px 0;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    background: #020617;
    border: 1px solid rgba(226, 232, 240, 0.1);
}

.reddit-explorer-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.28s ease, filter 0.28s ease;
    display: block;
}

.reddit-explorer-image:hover {
    transform: scale(1.018);
    filter: saturate(1.08);
}

.reddit-explorer-video-wrapper {
    position: relative;
    width: 100%;
    background: #020617;
    border-radius: 18px;
    overflow: hidden;
}

.reddit-explorer-video {
    width: 100%;
    height: 260px;
    border-radius: 18px;
    display: block;
}

.reddit-explorer-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.reddit-explorer-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    line-height: 1;
    white-space: nowrap;
}

.reddit-explorer-control::before {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transition: left 0.5s ease;
}

.reddit-explorer-control:hover::before {
    left: 110%;
}

.reddit-explorer-control:focus-visible {
    outline: 3px solid rgba(34, 211, 238, 0.32);
    outline-offset: 3px;
}

.reddit-explorer-audio-btn {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.reddit-explorer-audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: saturate(1.08);
}

.reddit-explorer-audio-btn:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
}

.reddit-explorer-audio-btn.loading {
    background: linear-gradient(135deg, #64748b, #475569);
}

.reddit-explorer-download {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-md);
}

.reddit-explorer-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: saturate(1.08);
}

.reddit-explorer-download:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
}

.reddit-explorer-download.downloading {
    background: var(--gradient-primary);
}

.reddit-explorer-external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gradient-primary);
    color: white;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    text-decoration: none;
    margin-top: 14px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    font-size: 0.88rem;
}

.reddit-explorer-external:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: saturate(1.08);
}

.reddit-explorer-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(226, 232, 240, 0.12);
}

.reddit-explorer-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 13px 10px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-align: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}

.reddit-explorer-metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 999px;
}

.reddit-explorer-metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(245, 158, 11, 0.38);
}

.reddit-explorer-metric-value {
    font-weight: 900;
    font-size: 1.1rem;
}

.reddit-explorer-metric-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: capitalize !important;
}

.reddit-explorer-upvotes .reddit-explorer-metric-value {
    color: var(--primary-light);
}

.reddit-explorer-comments .reddit-explorer-metric-value,
.reddit-explorer-comments {
    color: var(--secondary-light);
}

.reddit-explorer-loader {
    text-align: center;
    padding: 34px 20px;
    color: var(--text-primary);
    font-size: 1rem;
    display: none;
}

.reddit-explorer-spinner {
    border: 4px solid rgba(226, 232, 240, 0.16);
    border-top: 4px solid var(--primary-light);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    animation: spin 0.85s linear infinite;
    margin: 18px auto;
}

.reddit-explorer-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fecaca;
    padding: 16px 18px;
    border-radius: 16px;
    text-align: center;
    margin: 18px 0 0;
    font-weight: 700;
    display: none;
    font-size: 14px;
    box-shadow: 0 14px 32px rgba(239, 68, 68, 0.1);
}

.reddit-explorer-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 6, 23, 0.94);
    animation: fadeIn 0.25s ease;
    backdrop-filter: blur(10px);
}

.reddit-explorer-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(94vw, 1100px);
    max-width: 94%;
    max-height: 90%;
}

.reddit-explorer-popup img {
    width: 100%;
    height: auto;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
}

.reddit-explorer-close {
    position: absolute;
    top: 18px;
    right: 28px;
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s ease, transform 0.2s ease;
}

.reddit-explorer-close:hover {
    color: var(--primary-light);
    transform: scale(1.05);
}

.reddit-explorer-progress {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 22px;
    width: min(360px, calc(100vw - 32px));
    min-width: 0;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    display: none;
    color: var(--text-primary);
    backdrop-filter: blur(18px);
}

.reddit-explorer-progress.show {
    display: block;
    animation: slideInRight 0.35s ease-out;
}

.reddit-explorer-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.reddit-explorer-progress-text {
    font-weight: 800;
    font-size: 14px;
    color: var(--text-primary);
}

.reddit-explorer-cancel {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fecaca;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
    font-weight: 800;
    font-family: inherit;
}

.reddit-explorer-cancel:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(248, 113, 113, 0.45);
    transform: translateY(-1px);
}

.reddit-explorer-progress-bar {
    width: 100%;
    height: 11px;
    background: rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 11px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.24);
}

.reddit-explorer-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 2px 10px rgba(255, 69, 0, 0.34);
}

.reddit-explorer-progress-info {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.reddit-explorer-expand {
    background: var(--gradient-primary);
    color: white;
    border: none;
    min-height: 38px;
    padding: 0 15px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
    margin-top: 10px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
}

.reddit-explorer-expand:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.reddit-explorer-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(2, 6, 23, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    width: 54px;
    height: 54px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
    z-index: 5;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
}

.reddit-explorer-play-overlay:hover {
    background: rgba(255, 69, 0, 0.88);
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 16px 34px rgba(255, 69, 0, 0.3);
}

.reddit-explorer-play-overlay.hidden {
    display: none;
}

.reddit-explorer-new-search {
    background: var(--gradient-secondary) !important;
    min-width: 130px;
    box-shadow: 0 14px 30px rgba(34, 211, 238, 0.2);
}

.reddit-explorer-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    font-weight: 700;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.reddit-explorer-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.24);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
    margin-bottom: 10px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-7px) scale(1.015);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.035);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 1200px) {
    .reddit-explorer-main {
        max-width: 1000px;
    }

    .reddit-explorer-posts {
        grid-template-columns: 1fr;
    }

    .reddit-explorer-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .reddit-explorer-name {
        font-size: clamp(1.65rem, 4vw, 2.25rem);
    }

    .reddit-explorer-section-heading {
        font-size: 1.45rem;
    }

    .reddit-explorer-post-title {
        font-size: 1.14rem;
    }

    .reddit-explorer-search-form {
        flex-direction: column !important;
        align-items: stretch;
    }

    .reddit-explorer-button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .reddit-explorer-main {
        padding: 18px 14px 34px;
    }

    .reddit-explorer-top-section {
        margin-bottom: 22px;
        padding: 20px 0 12px;
    }

    .reddit-explorer-brand {
        gap: 14px;
        margin-bottom: 14px;
        margin-top: 0;
    }

    .reddit-explorer-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .reddit-explorer-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .reddit-explorer-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .reddit-explorer-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .reddit-explorer-control,
    .reddit-explorer-external {
        width: 100%;
        justify-content: center;
    }

    .reddit-explorer-search-form {
        flex-direction: column !important;
        gap: 12px;
    }

    .reddit-explorer-input {
        height: 52px !important;
        min-height: 52px !important;
        max-height: 52px !important;
        line-height: 52px !important;
    }

    .reddit-explorer-name {
        font-size: clamp(1.45rem, 6vw, 1.95rem);
    }

    .reddit-explorer-description {
        font-size: 15px;
    }

    .reddit-explorer-section-heading {
        font-size: 1.28rem;
    }

    .reddit-explorer-post-title {
        font-size: 1.05rem;
    }

    .reddit-explorer-post-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .reddit-explorer-date {
        text-align: left;
        white-space: normal;
    }

    .reddit-explorer-progress {
        right: 16px;
        bottom: 16px;
        left: 16px;
        width: auto;
    }
}

@media (max-width: 600px) {
    .reddit-explorer-main {
        padding: 16px 12px 30px;
    }

    .reddit-explorer-search-box,
    .reddit-explorer-user-panel,
    .reddit-explorer-post {
        padding: 18px;
        border-radius: 20px;
    }

    .reddit-explorer-posts {
        grid-template-columns: 1fr;
    }

    .reddit-explorer-icon {
        width: 56px;
        height: 56px;
        font-size: 26px;
        border-radius: 16px;
    }

    .reddit-explorer-avatar {
        width: 58px;
        height: 58px;
        font-size: 1.7rem;
        border-radius: 17px;
    }

    .reddit-explorer-user-header {
        gap: 14px;
        align-items: flex-start;
    }

    .reddit-explorer-name {
        font-size: clamp(1.32rem, 6.2vw, 1.72rem);
    }

    .reddit-explorer-user-info .reddit-explorer-name {
        font-size: 1.25rem;
    }

    .reddit-explorer-description {
        font-size: 14px;
    }

    .reddit-explorer-section-heading {
        font-size: 1.18rem;
    }

    .reddit-explorer-post-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .reddit-explorer-wrapper {
        min-height: auto;
    }

    .reddit-explorer-metrics {
        grid-template-columns: 1fr;
    }

    .reddit-explorer-stats {
        grid-template-columns: 1fr;
    }

    .reddit-explorer-main {
        padding: 14px 10px 26px;
    }

    .reddit-explorer-search-box,
    .reddit-explorer-user-panel,
    .reddit-explorer-post {
        padding: 16px;
    }

    .reddit-explorer-icon {
        width: 50px;
        height: 50px;
        font-size: 23px;
    }

    .reddit-explorer-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.45rem;
    }

    .reddit-explorer-name {
        font-size: clamp(1.22rem, 6.8vw, 1.58rem);
        line-height: 1.22;
    }

    .reddit-explorer-description {
        font-size: 13px;
    }

    .reddit-explorer-section-heading {
        font-size: 1.08rem;
        padding: 15px;
    }

    .reddit-explorer-post-title {
        font-size: 0.96rem;
    }

    .reddit-explorer-button {
        min-width: 0;
        width: 100%;
        height: 50px;
        min-height: 50px;
        padding: 0 16px;
    }

    .reddit-explorer-input {
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
        line-height: 50px !important;
        padding: 0 15px !important;
    }
}

@media (max-width: 400px) {
    .reddit-explorer-main {
        padding: 12px 8px 24px;
    }

    .reddit-explorer-search-box,
    .reddit-explorer-user-panel,
    .reddit-explorer-post {
        padding: 14px;
    }

    .reddit-explorer-icon {
        width: 46px;
        height: 46px;
        font-size: 21px;
    }

    .reddit-explorer-avatar {
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
    }

    .reddit-explorer-name {
        font-size: clamp(1.12rem, 6.5vw, 1.4rem);
    }

    .reddit-explorer-description {
        font-size: 12px;
    }

    .reddit-explorer-section-heading {
        font-size: 1rem;
    }

    .reddit-explorer-post-title {
        font-size: 0.92rem;
    }

    .reddit-explorer-progress-header,
    .reddit-explorer-progress-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 375px) {
    .reddit-explorer-main {
        padding: 10px 8px 22px;
    }

    .reddit-explorer-search-box,
    .reddit-explorer-user-panel,
    .reddit-explorer-post {
        padding: 12px;
        border-radius: 18px;
    }

    .reddit-explorer-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .reddit-explorer-avatar {
        width: 44px;
        height: 44px;
        font-size: 1.22rem;
    }

    .reddit-explorer-name {
        font-size: clamp(1.08rem, 6.2vw, 1.32rem);
    }

    .reddit-explorer-description {
        font-size: 12px;
    }

    .reddit-explorer-section-heading {
        font-size: 0.98rem;
    }

    .reddit-explorer-post-title {
        font-size: 0.9rem;
    }
}