@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, #1a3a52 0%, #0d2847 100%);
        min-height: 100vh;
        line-height: 1.6;
        color: #f8f9fa;
        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(0, 168, 204, 0.08) 0%, transparent 25%),
            radial-gradient(circle at 80% 70%, rgba(0, 126, 167, 0.08) 0%, transparent 25%),
            radial-gradient(circle at 50% 50%, rgba(0, 52, 89, 0.05) 0%, transparent 40%);
        z-index: 0;
    }

    :root {
        --primary-color: #00a8cc;
        --primary-light: #00c9e0;
        --primary-dark: #007ea7;
        --secondary-color: #007ea7;
        --secondary-light: #0099c7;
        --secondary-dark: #005f8a;
        --accent-color: #003459;
        --accent-light: #004878;
        --accent-dark: #00233d;
        --success-color: #00b894;
        --success-light: #00d2a0;
        --danger-color: #e74c3c;
        --danger-light: #f39c12;
        --warning-color: #f39c12;
        --warning-light: #f1c40f;
        --bg-primary: #0d2847;
        --bg-secondary: #0a1f3a;
        --bg-tertiary: #07152d;
        --bg-card: rgba(10, 31, 58, 0.8);
        --glass-bg: rgba(10, 31, 58, 0.7);
        --glass-border: rgba(0, 168, 204, 0.3);
        --text-primary: #f8f9fa;
        --text-secondary: #d1e8e2;
        --text-muted: #adb5bd;
        --text-accent: #00c9e0;
        --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, #00a8cc, #007ea7);
        --gradient-secondary: linear-gradient(135deg, #007ea7, #003459);
        --gradient-accent: linear-gradient(135deg, #00b894, #00a8cc);
    }

    .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(0, 168, 204, 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(0, 168, 204, 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(0, 168, 204, 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, #003459, #00233d);
    }

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

    .reddit-explorer-badge.nsfw {
        background: linear-gradient(135deg, #003459, #00233d);
    }

    .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, #003459, #00233d);
    }

    .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(231, 76, 60, 0.1);
        border: 1px solid rgba(231, 76, 60, 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(231, 76, 60, 0.1);
        border: 1px solid rgba(231, 76, 60, 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(231, 76, 60, 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(0, 168, 204, 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;
        }
            .reddit-explorer-search-form {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    flex-direction: row;
    flex-direction: column;
}
    }

    @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');

.reddit-explorer-wrapper {
    --primary-color: #ff4500;
    --primary-light: #ff6a2f;
    --primary-dark: #c73500;
    --secondary-color: #2f80ed;
    --secondary-light: #5fa2ff;
    --secondary-dark: #1f5fb7;
    --accent-color: #ffb000;
    --accent-light: #ffc94a;
    --accent-dark: #c98600;
    --success-color: #18a058;
    --success-light: #30c878;
    --danger-color: #ef4444;
    --danger-light: #f97316;
    --warning-color: #f59e0b;
    --warning-light: #facc15;
    --bg-primary: #fff7f2;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f4f7fb;
    --bg-card: rgba(255, 255, 255, 0.94);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 69, 0, 0.18);
    --text-primary: #172033;
    --text-secondary: #46546b;
    --text-muted: #6b7280;
    --text-accent: #c73500;
    --shadow-sm: 0 2px 8px rgba(23, 32, 51, 0.08);
    --shadow-md: 0 8px 20px rgba(23, 32, 51, 0.12);
    --shadow-lg: 0 16px 36px rgba(23, 32, 51, 0.16);
    --shadow-xl: 0 22px 60px rgba(23, 32, 51, 0.18);
    --gradient-primary: linear-gradient(135deg, #ff4500, #ff7a1a);
    --gradient-secondary: linear-gradient(135deg, #2f80ed, #1155cc);
    --gradient-accent: linear-gradient(135deg, #ffb000, #ff4500);
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #fff7f2 0%, #eef6ff 48%, #ffffff 100%);
    min-height: 100vh;
    width: 100%;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

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

.reddit-explorer-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 18% 18%, rgba(255, 69, 0, 0.12) 0%, transparent 28%),
        radial-gradient(circle at 82% 30%, rgba(47, 128, 237, 0.1) 0%, transparent 26%),
        radial-gradient(circle at 50% 82%, rgba(255, 176, 0, 0.1) 0%, transparent 34%);
    z-index: 0;
    pointer-events: none;
}

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

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

.reddit-explorer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 22px;
    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.28), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.reddit-explorer-logo-text {
    font-size: clamp(2rem, 5vw, 3.45rem);
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
    text-shadow: none;
    line-height: 1.12;
    max-width: 980px;
}

.reddit-explorer-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 30px;
    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: 38px;
}

.reddit-explorer-feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 18px 15px;
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    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.12), 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, 69, 0, 0.45);
}

.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(10px);
    padding: 28px;
    border-radius: 18px;
    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;
    flex-direction: row;
    align-items: stretch;
}

.reddit-explorer-search-input {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 15px 18px !important;
    border: 2px solid rgba(47, 128, 237, 0.18) !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    background: var(--bg-secondary) !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    color: var(--text-primary) !important;
    font-family: inherit !important;
    box-shadow: inset 0 1px 2px rgba(23, 32, 51, 0.06);
}

.reddit-explorer-search-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(255, 69, 0, 0.14), inset 0 1px 2px rgba(23, 32, 51, 0.06) !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: 148px;
    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.25), 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-video-play-overlay:focus-visible,
.reddit-explorer-external-link:focus-visible {
    outline: 3px solid rgba(47, 128, 237, 0.35);
    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(10px);
    padding: 28px;
    border-radius: 18px;
    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: 24px;
    margin-bottom: 24px;
}

.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.24), 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;
    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: 18px;
    margin-top: 24px;
}

.reddit-explorer-stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(47, 128, 237, 0.16);
    backdrop-filter: blur(10px);
    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-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: 28px;
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 18px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.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(min(100%, 420px), 1fr));
    gap: 22px;
}

.reddit-explorer-post-card {
    background: var(--bg-card);
    border: 1px solid rgba(47, 128, 237, 0.16);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    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: 16px 16px 0 0;
}

.reddit-explorer-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 44px rgba(23, 32, 51, 0.2);
    border-color: rgba(255, 69, 0, 0.42);
}

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

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

.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;
    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: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 0;
}

.reddit-explorer-badge.admin,
.admin {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

.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, #f59e0b, #d97706);
}

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

.reddit-explorer-post-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 15px;
    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: #0b0f19;
}

.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: #0b0f19;
    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: inline-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: 600;
    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.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(-3px);
    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,
.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.62;
    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: 600;
    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: 2px solid var(--bg-tertiary);
}

.reddit-explorer-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: rgba(255, 247, 242, 0.72);
    border: 1px solid rgba(47, 128, 237, 0.14);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    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.2rem;
}

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

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

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

.reddit-explorer-spinner {
    border: 4px solid rgba(47, 128, 237, 0.14);
    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.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
    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(11, 15, 25, 0.94);
    animation: fadeIn 0.3s ease;
}

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

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

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

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

.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: 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,
.show {
    display: block;
    animation: slideInRight 0.4s ease-out;
}

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

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

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

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

.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(23, 32, 51, 0.08);
}

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

.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 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(11, 15, 25, 0.74);
    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(11, 15, 25, 0.92);
    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(11, 15, 25, 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.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-container {
        max-width: 1200px;
        padding: 22px;
    }

    .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-logo-text {
        font-size: 2.45rem;
    }

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

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

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

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

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

    .reddit-explorer-header {
        padding: 26px 0 12px;
        margin-bottom: 28px;
    }

    .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-post-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .reddit-explorer-control-btn,
    .reddit-explorer-external-link {
        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.55rem;
    }

    .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: 18px;
        border-radius: 14px;
    }

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

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

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

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

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

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

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

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

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

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

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

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

    .reddit-explorer-close {
        top: 14px;
        right: 22px;
        font-size: 38px;
    }

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

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

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

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

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

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

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

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