@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=Manrope:wght@300;400;500;600;700;800&display=swap');
        
        .reddit-explorer-wrapper * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

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

        :root {
            --primary-color: #10b981;
            --primary-light: #34d399;
            --primary-dark: #047857;
            --secondary-color: #6366f1;
            --secondary-light: #818cf8;
            --secondary-dark: #4f46e5;
            --accent-color: #f43f5e;
            --accent-light: #fb7185;
            --accent-dark: #e11d48;
            --bg-primary: #1a1f36;
            --bg-secondary: #252b48;
            --bg-tertiary: #2d3561;
            --bg-card: #252b48;
            --glass-bg: rgba(16, 185, 129, 0.1);
            --glass-border: rgba(16, 185, 129, 0.2);
            --text-primary: #e2e8f0;
            --text-secondary: #cbd5e1;
            --text-muted: #94a3b8;
            --text-accent: #34d399;
            --shadow-sm: 0 2px 8px rgba(16, 185, 129, 0.1);
            --shadow-md: 0 4px 16px rgba(16, 185, 129, 0.15);
            --shadow-lg: 0 8px 32px rgba(16, 185, 129, 0.2);
            --shadow-xl: 0 16px 48px rgba(16, 185, 129, 0.25);
            --gradient-primary: linear-gradient(135deg, #10b981, #047857);
            --gradient-secondary: linear-gradient(135deg, #6366f1, #4f46e5);
            --gradient-accent: linear-gradient(135deg, #f43f5e, #e11d48);
        }

        .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(16, 185, 129, 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(16, 185, 129, 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(16, 185, 129, 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(16, 185, 129, 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, #be123c, #9f1239);
        }

        .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(16, 185, 129, 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=Manrope:wght@300;400;500;600;700;800&display=swap');

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

.reddit-explorer-wrapper {
    font-family: 'Manrope', sans-serif;
    background: radial-gradient(circle at top left, rgba(255, 69, 0, 0.16), transparent 34%), linear-gradient(135deg, #100f12 0%, #17191f 52%, #111827 100%);
    color: #f8fafc;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

:root {
    --primary-color: #ff4500;
    --primary-light: #ff7a45;
    --primary-dark: #c93700;
    --secondary-color: #0ea5e9;
    --secondary-light: #38bdf8;
    --secondary-dark: #0369a1;
    --accent-color: #f59e0b;
    --accent-light: #fbbf24;
    --accent-dark: #d97706;
    --bg-primary: #100f12;
    --bg-secondary: #191b22;
    --bg-tertiary: #252936;
    --bg-card: #20232d;
    --glass-bg: rgba(255, 69, 0, 0.1);
    --glass-border: rgba(255, 122, 69, 0.24);
    --text-primary: #f8fafc;
    --text-secondary: #d6dde8;
    --text-muted: #9ca3af;
    --text-accent: #ff7a45;
    --shadow-sm: 0 2px 8px rgba(255, 69, 0, 0.12);
    --shadow-md: 0 4px 16px rgba(255, 69, 0, 0.16);
    --shadow-lg: 0 8px 32px rgba(255, 69, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.34);
    --gradient-primary: linear-gradient(135deg, #ff4500, #c93700);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9, #0369a1);
    --gradient-accent: linear-gradient(135deg, #f59e0b, #d97706);
}

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

.reddit-explorer-top-section {
    text-align: center;
    margin-bottom: 42px;
    padding: 36px 0 26px;
    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;
    flex: 0 0 auto;
}

.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.14), 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.15rem, 5vw, 3.55rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ff7a45, #ff4500 48%, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
    text-shadow: 0 0 30px rgba(255, 69, 0, 0.24);
    max-width: 980px;
}

.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(190px, 1fr));
    gap: 18px;
    margin-bottom: 40px;
}

.reddit-explorer-feature {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 18px 15px;
    border-radius: 14px;
    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(255, 69, 0, 0.12), 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: 42px;
    height: 42px;
    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: rgba(25, 27, 34, 0.94);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 34px;
    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;
    align-items: stretch;
}

.reddit-explorer-input {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 15px 20px !important;
    border: 2px solid var(--bg-tertiary) !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: #0f1117 !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) !important;
    box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.14) !important;
    transform: translateY(-2px);
}

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

.reddit-explorer-button {
    padding: 15px 26px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 14px;
    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;
    white-space: nowrap;
}

.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.22), 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:focus-visible,
.reddit-explorer-control:focus-visible,
.reddit-explorer-cancel:focus-visible,
.reddit-explorer-expand:focus-visible,
.reddit-explorer-play-overlay:focus-visible,
.reddit-explorer-external:focus-visible {
    outline: 3px solid rgba(255, 122, 69, 0.38);
    outline-offset: 3px;
}

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

.reddit-explorer-user-panel {
    background: rgba(25, 27, 34, 0.94);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    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;
    flex: 0 0 auto;
}

.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.14), transparent);
    transform: rotate(45deg);
    animation: shine 4s infinite;
}

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

.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;
    overflow-wrap: anywhere;
}

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

.reddit-explorer-stat {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 16px;
    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-light);
    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: rgba(25, 27, 34, 0.94);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 18px;
    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(min(100%, 420px), 1fr));
    gap: 24px;
}

.reddit-explorer-post {
    background: rgba(25, 27, 34, 0.94);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    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%;
    min-width: 0;
}

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

.reddit-explorer-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.34);
    border-color: var(--primary-light);
}

.reddit-explorer-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    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;
    min-width: 0;
}

.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;
    flex: 0 0 auto;
}

.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, #be123c, #9f1239);
}

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

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

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

.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;
    display: block;
}

.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;
    justify-content: 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;
    min-height: 42px;
}

.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.22), 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);
    color: white;
}

.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: 14px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.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-light);
}

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

.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.12);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fca5a5;
    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(3, 5, 10, 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: #f8fafc;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    transition: color 0.3s ease;
}

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

.reddit-explorer-progress {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 25px;
    min-width: 350px;
    max-width: calc(100vw - 40px);
    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;
    gap: 14px;
    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.12);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #fca5a5;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: inherit;
}

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

.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.28);
}

.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(255, 69, 0, 0.4);
}

.reddit-explorer-progress-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    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(3, 5, 10, 0.78);
    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(3, 5, 10, 0.94);
    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;
}

.reddit-explorer-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 5, 10, 0.84);
    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;
}

@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;
    }
}

/* 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.45rem;
    }
    .reddit-explorer-section-heading {
        font-size: 1.8rem;
    }
    .reddit-explorer-post-title {
        font-size: 1.2rem;
    }
    .reddit-explorer-search-form {
        flex-direction: column !important;
    }
    .reddit-explorer-button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .reddit-explorer-main {
        padding: 18px 15px;
    }
    .reddit-explorer-top-section {
        margin-bottom: 32px;
        padding: 24px 0 18px;
    }
    .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-user-header {
        align-items: flex-start;
    }
    .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: 18px;
        margin-bottom: 25px;
        flex-wrap: wrap;
        margin-top: 18px;
    }
    .reddit-explorer-progress {
        right: 15px;
        bottom: 15px;
        min-width: 0;
        width: calc(100vw - 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-post-meta {
        align-items: flex-start;
        flex-direction: column;
    }
    .reddit-explorer-date {
        text-align: left;
    }
    .reddit-explorer-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        margin-bottom: 25px;
        flex-wrap: wrap;
        margin-top: 18px;
    }
}

@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;
        border-radius: 16px;
    }
    .reddit-explorer-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    .reddit-explorer-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    .reddit-explorer-user-header {
        gap: 14px;
    }
    .reddit-explorer-name {
        font-size: 1.6rem;
    }
    .reddit-explorer-description {
        font-size: 13px;
    }
    .reddit-explorer-section-heading {
        font-size: 1.2rem;
        padding: 16px;
    }
    .reddit-explorer-post-title {
        font-size: 0.95rem;
    }
    .reddit-explorer-input,
    .reddit-explorer-button {
        font-size: 13px !important;
    }
    .reddit-explorer-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 14px;
        margin-bottom: 25px;
        flex-wrap: wrap;
        margin-top: 16px;
    }
}

@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.9rem;
    }
    .reddit-explorer-progress {
        padding: 18px;
    }
    .reddit-explorer-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-bottom: 25px;
        flex-wrap: wrap;
        margin-top: 14px;
    }
}

@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.85rem;
    }
    .reddit-explorer-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-bottom: 25px;
        flex-wrap: wrap;
        margin-top: 12px;
    }
}