@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=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

        .reddit-explorer-wrapper {
            font-family: 'Inter', sans-serif;
            background: #1a202c;
            background-image:
                linear-gradient(135deg, #1a202c 0%, #2d3748 100%),
                radial-gradient(circle at 20% 80%, rgba(66, 153, 225, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(159, 122, 234, 0.1) 0%, transparent 50%);
            min-height: 100vh;
            line-height: 1.6;
            color: #e2e8f0;
            overflow-x: hidden;
        }

        :root {
            --primary-color: #4299e1;
            --primary-light: #63b3ed;
            --primary-dark: #3182ce;
            --secondary-color: #9f7aea;
            --secondary-light: #b794f4;
            --secondary-dark: #805ad5;
            --accent-color: #48bb78;
            --accent-light: #68d391;
            --accent-dark: #38a169;
            --warning-color: #ed8936;
            --warning-light: #f6ad55;
            --danger-color: #f56565;
            --danger-light: #fc8181;
            --success-color: #48bb78;
            --success-light: #68d391;
            --bg-primary: #2d3748;
            --bg-secondary: #2b3548;
            --bg-tertiary: #1a202c;
            --bg-card: #2d3748;
            --glass-bg: rgba(66, 153, 225, 0.1);
            --glass-border: rgba(66, 153, 225, 0.2);
            --text-primary: #e2e8f0;
            --text-secondary: #a0aec0;
            --text-muted: #718096;
            --text-accent: #4299e1;
            --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
            --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
            --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
            --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
            --gradient-primary: linear-gradient(135deg, #4299e1 0%, #9f7aea 100%);
            --gradient-secondary: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
            --gradient-accent: linear-gradient(135deg, #ed8936 0%, #f56565 100%);
        }

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

        .reddit-explorer-header {
            text-align: center;
            margin-bottom: 40px;
            padding: 40px 0;
            animation: slideInDown 1s ease-out;
        }

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

        .reddit-explorer-logo-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-logo-icon::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transform: rotate(45deg);
            animation: shine 3s infinite;
        }

        .reddit-explorer-badge {
            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-logo-text {
            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(66, 153, 225, 0.5);
        }

        .reddit-explorer-subtitle {
            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-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }

        .reddit-explorer-feature-card {
            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;
            box-shadow: var(--shadow-sm);
        }

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

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

        .reddit-explorer-feature-card: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-title {
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
            font-size: 14px;
        }

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

        .reddit-explorer-search-container::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-search-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-search-input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.2);
            transform: translateY(-2px);
        }

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

        .reddit-explorer-search-btn {
            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-search-btn::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-search-btn:hover::before {
            left: 100%;
        }

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

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

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

        .reddit-explorer-user-info::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-user-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-user-avatar::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transform: rotate(45deg);
            animation: shine 4s infinite;
        }

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

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

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

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

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

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

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

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

        .reddit-explorer-posts-section {
            display: none;
        }

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

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

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

        .reddit-explorer-post-card {
            background: var(--bg-card);
            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-card::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-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
            border-color: var(--primary-color);
        }

        .reddit-explorer-post-header {
            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-info {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .reddit-explorer-subreddit-badge {
            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-post-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-post-meta {
            font-size: 0.8rem;
            color: var(--text-muted);
            font-weight: 500;
            text-align: right;
        }

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

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

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

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

        .reddit-explorer-badge.archived {
            background: linear-gradient(135deg, #4a5568, #2d3748);
        }

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

        .reddit-explorer-badge.nsfw {
            background: linear-gradient(135deg, #9f7aea, #805ad5);
        }

        .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-content {
            margin-bottom: 20px;
            flex-grow: 1;
        }

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

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

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

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

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

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

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

        .reddit-explorer-control-btn {
            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-btn::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-btn:hover::before {
            left: 100%;
        }

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

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

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

        .reddit-explorer-stream-audio-btn.loading {
            background: linear-gradient(135deg, #4a5568, #2d3748);
        }

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

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

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

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

        .reddit-explorer-external-link {
            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-link:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
        }

        .reddit-explorer-post-stats {
            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-stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 12px;
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            border-radius: 15px;
            text-align: center;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-sm);
        }

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

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

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

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

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

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

        .reddit-explorer-loading {
            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-message {
            background: rgba(245, 101, 101, 0.2);
            border: 1px solid rgba(245, 101, 101, 0.3);
            color: var(--danger-color);
            padding: 20px;
            border-radius: 16px;
            text-align: center;
            margin: 20px 0;
            font-weight: 600;
            display: none;
            font-size: 14px;
        }

        .reddit-explorer-modal {
            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-modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            max-width: 90%;
            max-height: 90%;
        }

        .reddit-explorer-modal 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-download-progress {
            position: fixed;
            bottom: 25px;
            right: 25px;
            background: var(--bg-card);
            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-download-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-btn {
            background: rgba(245, 101, 101, 0.2);
            border: 1px solid rgba(245, 101, 101, 0.3);
            color: var(--danger-color);
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .reddit-explorer-cancel-btn:hover {
            background: rgba(245, 101, 101, 0.3);
        }

        .reddit-explorer-progress-bar-container {
            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.3);
        }

        .reddit-explorer-progress-bar-fill {
            height: 100%;
            background: var(--gradient-primary);
            border-radius: 6px;
            width: 0%;
            transition: width 0.3s ease;
            box-shadow: 0 2px 8px rgba(66, 153, 225, 0.6);
        }

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

        .reddit-explorer-expand-btn {
            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-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-sm);
        }

        .reddit-explorer-video-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-video-play-overlay:hover {
            background: rgba(0, 0, 0, 0.9);
            transform: translate(-50%, -50%) scale(1.1);
        }

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

        .reddit-explorer-new-search-btn {
            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 slideInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideInUp {
            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-video-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-video-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 {
                grid-template-columns: 1fr;
            }

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

        @media (max-width: 992px) {
            .reddit-explorer-logo-text {
                font-size: 2.5rem;
            }
            
            .reddit-explorer-section-title {
                font-size: 1.8rem;
            }
            
            .reddit-explorer-post-title {
                font-size: 1.2rem;
            }
                    .reddit-explorer-search-form {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    flex-direction: column !important;
}
        }

        @media (max-width: 768px) {
            .reddit-explorer-features-grid {
                grid-template-columns: 1fr;
            }

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

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

            .reddit-explorer-media-controls {
                flex-direction: column;
            }

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

            .reddit-explorer-search-form {
                flex-direction: column;
            }
            
            .reddit-explorer-logo-text {
                font-size: 2rem;
            }
            
            .reddit-explorer-subtitle {
                font-size: 16px;
            }
            
            .reddit-explorer-section-title {
                font-size: 1.6rem;
            }
            
            .reddit-explorer-post-title {
                font-size: 1.1rem;
            }
                    .reddit-explorer-search-form {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    flex-direction: column !important;
}
					.reddit-explorer-logo {
	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-container {
                padding: 15px;
            }

            .reddit-explorer-search-container,
            .reddit-explorer-user-info,
            .reddit-explorer-post-card {
                padding: 20px;
            }

            .reddit-explorer-posts-grid {
                grid-template-columns: 1fr;
            }
            
            .reddit-explorer-logo-icon {
                width: 60px;
                height: 60px;
                font-size: 28px;
            }
            
            .reddit-explorer-user-avatar {
                width: 60px;
                height: 60px;
                font-size: 2rem;
            }
            
            .reddit-explorer-logo-text {
                font-size: 1.8rem;
            }
            
            .reddit-explorer-subtitle {
                font-size: 14px;
            }
            
            .reddit-explorer-section-title {
                font-size: 1.4rem;
            }
            
            .reddit-explorer-post-title {
                font-size: 1rem;
            }
					.reddit-explorer-logo {
	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-post-stats {
                grid-template-columns: 1fr;
            }

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

            .reddit-explorer-container {
                padding: 10px;
            }

            .reddit-explorer-search-container,
            .reddit-explorer-user-info,
            .reddit-explorer-post-card {
                padding: 15px;
            }
            
            .reddit-explorer-logo-icon {
                width: 50px;
                height: 50px;
                font-size: 24px;
            }
            
            .reddit-explorer-user-avatar {
                width: 50px;
                height: 50px;
                font-size: 1.8rem;
            }
            
            .reddit-explorer-logo-text {
                font-size: 1.6rem;
            }
            
            .reddit-explorer-subtitle {
                font-size: 13px;
            }
            
            .reddit-explorer-section-title {
                font-size: 1.2rem;
            }
            
            .reddit-explorer-post-title {
                font-size: 0.9rem;
            }
					.reddit-explorer-logo {
	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-container {
                padding: 8px;
            }

            .reddit-explorer-search-container,
            .reddit-explorer-user-info,
            .reddit-explorer-post-card {
                padding: 12px;
            }
            
            .reddit-explorer-logo-icon {
                width: 45px;
                height: 45px;
                font-size: 22px;
            }
            
            .reddit-explorer-user-avatar {
                width: 45px;
                height: 45px;
                font-size: 1.6rem;
            }
            
            .reddit-explorer-logo-text {
                font-size: 1.4rem;
            }
            
            .reddit-explorer-subtitle {
                font-size: 12px;
            }
            
            .reddit-explorer-section-title {
                font-size: 1.1rem;
            }
            
            .reddit-explorer-post-title {
                font-size: 0.85rem;
            }
					.reddit-explorer-logo {
	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-container {
                padding: 5px;
            }

            .reddit-explorer-search-container,
            .reddit-explorer-user-info,
            .reddit-explorer-post-card {
                padding: 10px;
            }
            
            .reddit-explorer-logo-icon {
                width: 40px;
                height: 40px;
                font-size: 20px;
            }
            
            .reddit-explorer-user-avatar {
                width: 40px;
                height: 40px;
                font-size: 1.4rem;
            }
            
            .reddit-explorer-logo-text {
                font-size: 1.2rem;
            }
            
            .reddit-explorer-subtitle {
                font-size: 11px;
            }
            
            .reddit-explorer-section-title {
                font-size: 1rem;
            }
            
            .reddit-explorer-post-title {
                font-size: 0.8rem;
            }
					.reddit-explorer-logo {
	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=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary-color: #ff4500;
    --primary-light: #ff6a2a;
    --primary-dark: #d93a00;
    --secondary-color: #0079d3;
    --secondary-light: #38a5f6;
    --secondary-dark: #005ea8;
    --accent-color: #46d160;
    --accent-light: #70e184;
    --accent-dark: #2fb346;
    --warning-color: #ffb000;
    --warning-light: #ffc947;
    --danger-color: #ff5c5c;
    --danger-light: #ff8585;
    --success-color: #46d160;
    --success-light: #70e184;
    --bg-primary: #17202b;
    --bg-secondary: #202b38;
    --bg-tertiary: #0f1419;
    --bg-card: #1b2633;
    --glass-bg: rgba(255, 69, 0, 0.1);
    --glass-border: rgba(255, 255, 255, 0.12);
    --text-primary: #f8fafc;
    --text-secondary: #c7d2df;
    --text-muted: #8fa1b3;
    --text-accent: #ff6a2a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 8px 18px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 16px 30px rgba(0, 0, 0, 0.34);
    --shadow-xl: 0 24px 50px rgba(0, 0, 0, 0.42);
    --gradient-primary: linear-gradient(135deg, #ff4500 0%, #ff7a18 100%);
    --gradient-secondary: linear-gradient(135deg, #0079d3 0%, #46d160 100%);
    --gradient-accent: linear-gradient(135deg, #ffb000 0%, #ff4500 100%);
}

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

.reddit-explorer-wrapper {
    width: 100%;
    position: relative;
    font-family: 'Inter', sans-serif;
    background: #0f1419;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(255, 69, 0, 0.16) 0%, transparent 34%),
        radial-gradient(circle at 88% 12%, rgba(0, 121, 211, 0.16) 0%, transparent 36%),
        linear-gradient(135deg, #0f1419 0%, #17202b 45%, #111827 100%);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
}

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

.reddit-explorer-header {
    text-align: center;
    margin-bottom: 34px;
    padding: 34px 0 18px;
    animation: slideInDown 1s ease-out;
}

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

.reddit-explorer-logo-icon {
    width: 76px;
    height: 76px;
    background: var(--gradient-primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 34px;
    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-logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.reddit-explorer-logo-text {
    max-width: 980px;
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 900;
    background: linear-gradient(135deg, #fff7ed 0%, #ff8a3d 42%, #38a5f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
    text-shadow: 0 0 28px rgba(255, 69, 0, 0.28);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

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

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

.reddit-explorer-feature-card {
    background: rgba(27, 38, 51, 0.92);
    border: 1px solid var(--glass-border);
    padding: 18px 14px;
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

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

.reddit-explorer-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 106, 42, 0.7);
}

.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-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    font-size: 14px;
}

.reddit-explorer-search-container {
    background: rgba(27, 38, 51, 0.95);
    border: 1px solid var(--glass-border);
    padding: 28px;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 34px;
    animation: slideInUp 1s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
}

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

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

.reddit-explorer-search-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 15px 18px !important;
    border: 2px solid rgba(143, 161, 179, 0.28) !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: var(--bg-tertiary) !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    color: var(--text-primary) !important;
    font-family: inherit !important;
}

.reddit-explorer-search-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.22) !important;
    transform: translateY(-1px);
}

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

.reddit-explorer-search-btn {
    padding: 15px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 146px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    font-family: inherit;
    white-space: nowrap;
}

.reddit-explorer-search-btn::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-search-btn:hover::before {
    left: 100%;
}

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

.reddit-explorer-search-btn:focus-visible,
.reddit-explorer-control-btn:focus-visible,
.reddit-explorer-download-btn:focus-visible,
.reddit-explorer-cancel-btn:focus-visible,
.reddit-explorer-expand-btn:focus-visible,
.reddit-explorer-external-link:focus-visible,
.reddit-explorer-video-play-overlay:focus-visible {
    outline: 3px solid rgba(56, 165, 246, 0.75);
    outline-offset: 3px;
}

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

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

.reddit-explorer-user-info {
    background: rgba(27, 38, 51, 0.95);
    border: 1px solid var(--glass-border);
    padding: 28px;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 34px;
    display: none;
    animation: slideInDown 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.reddit-explorer-user-info::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: 22px;
    margin-bottom: 24px;
    min-width: 0;
}

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

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

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

.reddit-explorer-user-details h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

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

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

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

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

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

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

.reddit-explorer-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 650;
    text-transform: capitalize;
}

.reddit-explorer-posts-section {
    display: none;
}

.reddit-explorer-section-title {
    color: var(--text-primary);
    font-size: 1.9rem;
    font-weight: 900;
    margin-bottom: 26px;
    text-align: center;
    background: rgba(27, 38, 51, 0.95);
    border: 1px solid var(--glass-border);
    padding: 18px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    line-height: 1.25;
}

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

.reddit-explorer-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.reddit-explorer-post-card {
    background: rgba(27, 38, 51, 0.95);
    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-card::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-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.46);
    border-color: rgba(255, 106, 42, 0.75);
}

.reddit-explorer-post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(143, 161, 179, 0.2);
}

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

.reddit-explorer-subreddit-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    overflow-wrap: anywhere;
}

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

.reddit-explorer-post-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
    flex: 0 0 auto;
}

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

.reddit-explorer-badge {
    background: var(--gradient-secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 0;
}

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

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

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

.reddit-explorer-badge.locked,
.locked {
    background: linear-gradient(135deg, #ffb000, #ff6a2a);
}

.reddit-explorer-badge.nsfw,
.nsfw {
    background: linear-gradient(135deg, #e11d48, #9f1239);
}

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

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

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

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

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

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

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

.reddit-explorer-video-player {
    width: 100%;
    height: 250px;
    border-radius: 14px;
    display: block;
}

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

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

.reddit-explorer-control-btn::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-btn:hover::before {
    left: 100%;
}

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

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

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

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

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

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

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

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

.reddit-explorer-external-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gradient-primary);
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
    max-width: 100%;
    overflow-wrap: anywhere;
}

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

.reddit-explorer-post-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(143, 161, 179, 0.2);
}

.reddit-explorer-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

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

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

.reddit-explorer-stat-value {
    font-weight: 900;
    font-size: 1.15rem;
}

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

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

.reddit-explorer-loading {
    text-align: center;
    padding: 38px 18px;
    color: var(--text-primary);
    font-size: 1.05rem;
    display: none;
}

.reddit-explorer-spinner {
    border: 4px solid rgba(143, 161, 179, 0.24);
    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-message {
    background: rgba(255, 92, 92, 0.14);
    border: 1px solid rgba(255, 92, 92, 0.34);
    color: var(--danger-light);
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    margin: 20px 0 0;
    font-weight: 700;
    display: none;
    font-size: 14px;
}

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

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

.reddit-explorer-modal img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    border-radius: 18px;
    display: block;
}

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

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

.reddit-explorer-download-progress {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 22px;
    min-width: 330px;
    max-width: calc(100vw - 32px);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    display: none;
    color: var(--text-primary);
}

.reddit-explorer-download-progress.show,
.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: 800;
    font-size: 14px;
    color: var(--text-primary);
}

.reddit-explorer-cancel-btn {
    background: rgba(255, 92, 92, 0.16);
    border: 1px solid rgba(255, 92, 92, 0.35);
    color: var(--danger-light);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    font-family: inherit;
}

.reddit-explorer-cancel-btn:hover {
    background: rgba(255, 92, 92, 0.26);
}

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

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

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

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

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

.reddit-explorer-video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 20, 25, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    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-video-play-overlay:hover {
    background: rgba(15, 20, 25, 0.94);
    transform: translate(-50%, -50%) scale(1.1);
}

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

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

.reddit-explorer-video-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 slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    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.04);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 1200px) {
    .reddit-explorer-posts-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 992px) {
    .reddit-explorer-container {
        padding: 24px 18px 48px;
    }

    .reddit-explorer-logo-text {
        font-size: 2.45rem;
    }

    .reddit-explorer-section-title {
        font-size: 1.7rem;
    }

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

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

    .reddit-explorer-search-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .reddit-explorer-header {
        padding: 26px 0 12px;
        margin-bottom: 26px;
    }

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

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

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

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

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

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

    .reddit-explorer-logo-text {
        font-size: 2rem;
    }

    .reddit-explorer-subtitle {
        font-size: 16px;
    }

    .reddit-explorer-section-title {
        font-size: 1.5rem;
    }

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

    .reddit-explorer-download-progress {
        left: 16px;
        right: 16px;
        bottom: 16px;
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .reddit-explorer-container {
        padding: 20px 14px 42px;
    }

    .reddit-explorer-search-container,
    .reddit-explorer-user-info,
    .reddit-explorer-post-card {
        padding: 18px;
        border-radius: 16px;
    }

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

    .reddit-explorer-logo {
        gap: 14px;
        margin-top: 10px;
    }

    .reddit-explorer-logo-icon {
        width: 58px;
        height: 58px;
        font-size: 28px;
    }

    .reddit-explorer-user-avatar {
        width: 58px;
        height: 58px;
        font-size: 2rem;
    }

    .reddit-explorer-user-details h2 {
        font-size: 1.55rem;
    }

    .reddit-explorer-logo-text {
        font-size: 1.75rem;
    }

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

    .reddit-explorer-section-title {
        font-size: 1.35rem;
    }

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

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

    .reddit-explorer-post-meta {
        text-align: left;
    }

    .reddit-explorer-cancel-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .reddit-explorer-container {
        padding: 18px 12px 36px;
    }

    .reddit-explorer-search-container,
    .reddit-explorer-user-info,
    .reddit-explorer-post-card {
        padding: 15px;
    }

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

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

    .reddit-explorer-logo {
        gap: 12px;
        margin-top: 8px;
    }

    .reddit-explorer-logo-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        border-radius: 14px;
    }

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

    .reddit-explorer-logo-text {
        font-size: 1.45rem;
    }

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

    .reddit-explorer-section-title {
        font-size: 1.2rem;
    }

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

    .reddit-explorer-search-input,
    .reddit-explorer-search-btn {
        font-size: 13px !important;
    }

    .reddit-explorer-close {
        top: 14px;
        right: 20px;
        font-size: 36px;
    }
}

@media (max-width: 400px) {
    .reddit-explorer-container {
        padding: 16px 10px 32px;
    }

    .reddit-explorer-search-container,
    .reddit-explorer-user-info,
    .reddit-explorer-post-card {
        padding: 12px;
    }

    .reddit-explorer-logo-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .reddit-explorer-user-avatar {
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }

    .reddit-explorer-logo-text {
        font-size: 1.3rem;
    }

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

    .reddit-explorer-section-title {
        font-size: 1.08rem;
    }

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

@media (max-width: 375px) {
    .reddit-explorer-container {
        padding: 14px 8px 30px;
    }

    .reddit-explorer-search-container,
    .reddit-explorer-user-info,
    .reddit-explorer-post-card {
        padding: 10px;
    }

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

    .reddit-explorer-user-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .reddit-explorer-logo-text {
        font-size: 1.2rem;
    }

    .reddit-explorer-subtitle {
        font-size: 11px;
    }

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

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