@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=Poppins: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: 'Poppins', sans-serif;
        background: linear-gradient(135deg, #0f3443 0%, #34e89e 100%);
        min-height: 100vh;
        line-height: 1.6;
        color: #e2e8f0;
        overflow-x: hidden;
        position: relative;
    }

    .reddit-explorer-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: 
            radial-gradient(circle at 20% 30%, rgba(52, 232, 158, 0.12) 0%, transparent 25%),
            radial-gradient(circle at 80% 70%, rgba(33, 150, 243, 0.12) 0%, transparent 25%),
            radial-gradient(circle at 50% 50%, rgba(52, 232, 158, 0.08) 0%, transparent 40%);
        z-index: 0;
    }

    :root {
        --primary-color: #34e89e;
        --primary-light: #5ef5b9;
        --primary-dark: #1dd086;
        --secondary-color: #0f3443;
        --secondary-light: #1a4a5c;
        --secondary-dark: #0a2833;
        --accent-color: #2196F3;
        --accent-light: #42a5f5;
        --accent-dark: #1e88e5;
        --success-color: #4caf50;
        --success-light: #81c784;
        --danger-color: #f44336;
        --danger-light: #ef5350;
        --warning-color: #ff9800;
        --warning-light: #ffb74d;
        --bg-primary: #0a2833;
        --bg-secondary: #0f3443;
        --bg-tertiary: #1a4a5c;
        --bg-card: #0f3443;
        --glass-bg: rgba(15, 52, 67, 0.7);
        --glass-border: rgba(52, 232, 158, 0.3);
        --text-primary: #f1f5f9;
        --text-secondary: #b3e5fc;
        --text-muted: #81d4fa;
        --text-accent: #5ef5b9;
        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
        --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
        --gradient-primary: linear-gradient(135deg, #34e89e, #2196F3);
        --gradient-secondary: linear-gradient(135deg, #2196F3, #34e89e);
        --gradient-accent: linear-gradient(135deg, #4caf50, #2196F3);
    }

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

    .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.1), 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(52, 232, 158, 0.5);
    }

    .reddit-explorer-subtitle {
        color: var(--text-secondary);
        font-size: 18px;
        font-weight: 600;
        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(--glass-bg);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
        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-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(52, 232, 158, 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(--glass-bg);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
        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;
        flex-direction: row;
    }

    .reddit-explorer-search-input {
        flex: 1 !important;
        padding: 15px 20px !important;
        border: 2px solid var(--glass-border) !important;
        border-radius: 16px !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;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .reddit-explorer-search-input:focus {
        border-color: var(--primary-color) !important;
        box-shadow: 0 0 0 4px rgba(52, 232, 158, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
        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(--glass-bg);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
        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.1), 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(--glass-bg);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
        padding: 20px;
        border-radius: 20px;
        text-align: center;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .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(--glass-bg);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
        padding: 20px;
        border-radius: 20px;
        position: relative;
        overflow: hidden;
    }

    .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(--glass-bg);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
        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, #64748b, #475569);
    }

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

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

    .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, #64748b, #475569);
    }

    .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(--glass-bg);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
        border-radius: 15px;
        text-align: center;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .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(244, 67, 54, 0.1);
        border: 1px solid rgba(244, 67, 54, 0.2);
        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(--glass-bg);
        border: 1px solid var(--glass-border);
        backdrop-filter: blur(10px);
        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(244, 67, 54, 0.1);
        border: 1px solid rgba(244, 67, 54, 0.2);
        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(244, 67, 54, 0.15);
    }

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

    .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(52, 232, 158, 0.4);
    }

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

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

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

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

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

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

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

:root {
    --primary-color: #ff4500;
    --primary-light: #ff7a45;
    --primary-dark: #d73700;
    --secondary-color: #1f2937;
    --secondary-light: #374151;
    --secondary-dark: #111827;
    --accent-color: #0079d3;
    --accent-light: #38a3f1;
    --accent-dark: #005ea8;
    --success-color: #22c55e;
    --success-light: #86efac;
    --danger-color: #ef4444;
    --danger-light: #f87171;
    --warning-color: #f59e0b;
    --warning-light: #fbbf24;
    --bg-primary: #0f172a;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-card: #172033;
    --glass-bg: rgba(15, 23, 42, 0.82);
    --glass-border: rgba(255, 69, 0, 0.24);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent: #ff7a45;
    --shadow-sm: 0 2px 8px rgba(2, 6, 23, 0.2);
    --shadow-md: 0 6px 18px rgba(2, 6, 23, 0.28);
    --shadow-lg: 0 12px 32px rgba(2, 6, 23, 0.34);
    --shadow-xl: 0 18px 48px rgba(2, 6, 23, 0.42);
    --gradient-primary: linear-gradient(135deg, #ff4500, #ff7a45);
    --gradient-secondary: linear-gradient(135deg, #0079d3, #38a3f1);
    --gradient-accent: linear-gradient(135deg, #ff4500, #0079d3);
}

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

.reddit-explorer-wrapper {
    width: 100%;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    background:
        radial-gradient(circle at 14% 18%, rgba(255, 69, 0, 0.18) 0, transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(0, 121, 211, 0.16) 0, transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #111827 52%, #1f2937 100%);
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

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

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

.reddit-explorer-header {
    text-align: center;
    margin-bottom: 34px;
    padding: 36px 0 26px;
    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;
}

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

.reddit-explorer-logo-text {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff, #ff7a45 45%, #38a3f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
    text-shadow: 0 0 24px rgba(255, 69, 0, 0.32);
    line-height: 1.16;
    max-width: 980px;
}

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

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

.reddit-explorer-feature-card {
    background: var(--glass-bg);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(12px);
    padding: 18px 14px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.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(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 69, 0, 0.55);
}

.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: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    padding: 28px;
    border-radius: 18px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 28px;
    animation: slideInUp 1s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
}

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

.reddit-explorer-search-form {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    position: relative;
    flex-direction: row;
    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(148, 163, 184, 0.28) !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: rgba(15, 23, 42, 0.88) !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    color: var(--text-primary) !important;
    font-family: inherit !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.reddit-explorer-search-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.16), inset 0 2px 5px rgba(0, 0, 0, 0.2) !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: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 145px;
    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.22), transparent);
    transition: left 0.5s;
}

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

.reddit-explorer-search-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    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 {
    outline: 3px solid rgba(255, 122, 69, 0.42);
    outline-offset: 3px;
}

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

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

.reddit-explorer-user-info {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    padding: 28px;
    border-radius: 18px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 36px;
    display: none;
    animation: slideInDown 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.reddit-explorer-user-info::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    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.35rem;
    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.16), transparent);
    transform: rotate(45deg);
    animation: shine 4s infinite;
}

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

.reddit-explorer-user-details h2 {
    font-size: clamp(1.35rem, 4vw, 2rem);
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

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

.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: rgba(17, 24, 39, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(10px);
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.reddit-explorer-stat-card:hover {
    transform: translateY(-4px);
    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.86rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: capitalize;
}

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

.reddit-explorer-section-title {
    color: var(--text-primary);
    font-size: clamp(1.35rem, 4vw, 2rem);
    font-weight: 900;
    margin-bottom: 26px;
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    padding: 18px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

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

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

.reddit-explorer-post-card {
    background: var(--glass-bg);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-xl);
    transition: all 0.35s 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;
    inset: 0 0 auto;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 16px 16px 0 0;
}

.reddit-explorer-post-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 42px rgba(2, 6, 23, 0.5);
    border-color: rgba(255, 69, 0, 0.56);
}

.reddit-explorer-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    min-width: 0;
}

.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: 700;
    box-shadow: var(--shadow-sm);
    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: 600;
    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-sm);
    animation: pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 0;
}

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

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

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

.locked {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.nsfw {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.show {
    display: block;
}

.hidden {
    display: none;
}

.loading {
    opacity: 0.72;
}

.downloading {
    opacity: 0.9;
}

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

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

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

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

.reddit-explorer-badge.nsfw {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.reddit-explorer-post-title {
    font-size: clamp(1rem, 3vw, 1.35rem);
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    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: #020617;
}

.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: #020617;
    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-height: 42px;
}

.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.22), 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(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

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

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

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

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

.reddit-explorer-external-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gradient-secondary);
    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;
    overflow-wrap: anywhere;
}

.reddit-explorer-external-link:hover {
    transform: translateY(-2px);
    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(148, 163, 184, 0.22);
}

.reddit-explorer-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: rgba(17, 24, 39, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

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

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

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

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

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

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

.reddit-explorer-spinner {
    border: 4px solid rgba(148, 163, 184, 0.28);
    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(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.34);
    color: #fecaca;
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    margin: 20px 0 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(2, 6, 23, 0.96);
    animation: fadeIn 0.3s ease;
}

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

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

.reddit-explorer-close {
    position: absolute;
    top: 18px;
    right: 30px;
    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: rgba(15, 23, 42, 0.94);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 22px;
    width: min(350px, calc(100vw - 32px));
    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;
    gap: 14px;
    margin-bottom: 15px;
}

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

.reddit-explorer-cancel-btn {
    background: rgba(239, 68, 68, 0.13);
    border: 1px solid rgba(239, 68, 68, 0.34);
    color: #fecaca;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    font-family: inherit;
    flex: 0 0 auto;
}

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

.reddit-explorer-progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(30, 41, 59, 0.9);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.24);
}

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

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

.reddit-explorer-expand-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 10px;
    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(2, 6, 23, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.22);
    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(2, 6, 23, 0.92);
    transform: translate(-50%, -50%) scale(1.08);
}

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

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

.reddit-explorer-video-loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.28);
    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(-8px) 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(-24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

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

@media (max-width: 1200px) {
    .reddit-explorer-container {
        max-width: 100%;
    }

    .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 42px;
    }

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

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

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

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

    .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,
    .reddit-explorer-external-link {
        width: 100%;
        justify-content: center;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    .reddit-explorer-user-header {
        gap: 14px;
    }

    .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.35rem;
    }

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

    .reddit-explorer-download-progress {
        right: 16px;
        bottom: 16px;
        width: calc(100vw - 32px);
        padding: 18px;
    }
}

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

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

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

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

    .reddit-explorer-logo-icon {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }

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

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

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

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

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

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

    .reddit-explorer-video-player {
        height: 210px;
    }

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

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

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

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

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

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

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

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

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

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

@media (max-width: 375px) {
    .reddit-explorer-container {
        padding: 10px 6px 24px;
    }

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

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

    .reddit-explorer-user-avatar {
        width: 42px;
        height: 42px;
        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;
    }
}