/* Premium Visual Styles for ArabicDiscord Profiles Directory and Detail Pages */

/* Modern Gradients & Themes */
:root {
    --primary-blue: #4156BD;
    --accent-blue: #6679D8;
    --hover-blue: #2F49FF;
    --dark-bg: #050816;
    --panel-bg: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-border-hover: rgba(102, 121, 216, 0.3);
    --glass-blur: 16px;
}

/* Base style resets and helper updates */
.bg-dark-custom {
    background-color: var(--dark-bg);
}

/* Glassmorphism Panel standard */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--panel-border);
    border-radius: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
    border-color: var(--panel-border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(47, 73, 255, 0.05);
}

/* Hero elements for Profiles Directory */
.profiles-hero {
    min-height: 45vh;
    padding-top: calc(7.5rem - 75px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-transition-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    z-index: 15;
    pointer-events: none;
    overflow: visible;
}

.hero-transition-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(5, 8, 22, 0.05) 15%,
        rgba(5, 8, 22, 0.18) 30%,
        rgba(5, 8, 22, 0.42) 50%,
        rgba(5, 8, 22, 0.72) 70%,
        rgba(5, 8, 22, 0.92) 85%,
        #050816 100%
    );
}

.hero-transition-glow {
    position: absolute;
    bottom: -20px;
    left: -5%;
    right: -5%;
    height: 80px;
    background: linear-gradient(
        to bottom,
        rgba(65, 86, 189, 0.06) 0%,
        rgba(47, 73, 255, 0.03) 50%,
        transparent 100%
    );
    filter: blur(30px);
    -webkit-filter: blur(30px);
    opacity: 0.8;
    animation: heroTransitionGlowPulse 8s ease-in-out infinite;
}

.hero-transition-accent {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    max-width: 800px;
    height: 60px;
    background: radial-gradient(
        ellipse at center,
        rgba(102, 121, 216, 0.10) 0%,
        rgba(65, 86, 189, 0.04) 40%,
        transparent 75%
    );
    filter: blur(20px);
    -webkit-filter: blur(20px);
    opacity: 0.7;
}

@keyframes heroTransitionGlowPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scaleX(1);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.02);
    }
}

@media (min-width: 768px) {
    .hero-transition-zone {
        height: 220px;
    }
    .hero-transition-glow {
        height: 100px;
        bottom: -25px;
    }
    .hero-transition-accent {
        height: 80px;
        bottom: -40px;
        width: 60%;
    }
}

@media (max-width: 480px) {
    .hero-transition-zone {
        height: 140px;
    }
    .hero-transition-glow {
        height: 60px;
        bottom: -15px;
    }
    .hero-transition-accent {
        height: 40px;
        bottom: -20px;
        width: 85%;
    }
}

/* Search input wrapper */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1.1rem 1.5rem 1.1rem 3.5rem;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 0.95rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

[dir="rtl"] .search-input {
    padding: 1.1rem 3.5rem 1.1rem 1.5rem;
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-blue);
    box-shadow: 0 0 25px rgba(102, 121, 216, 0.25);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 1.25rem;
    transform: translateY(-50%);
    color: #9BA3C7;
    pointer-events: none;
    transition: color 0.3s ease;
}

[dir="rtl"] .search-icon {
    left: auto;
    right: 1.25rem;
}

.search-input:focus ~ .search-icon {
    color: #fff;
}

/* Custom sorting dropdown menu */
.sort-select-wrapper {
    position: relative;
}

.sort-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
}

.sort-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 200px;
    background: rgba(13, 18, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 0.5rem;
    z-index: 50;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease-out;
}

[dir="rtl"] .sort-dropdown {
    right: auto;
    left: 0;
}

.sort-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    color: #9BA3C7;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

[dir="rtl"] .sort-item {
    text-align: right;
}

.sort-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sort-item.active {
    color: #fff;
    background: var(--primary-blue);
}

/* Profile card styles */
.profile-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: rgba(13, 18, 40, 0.4);
    border: 1px solid var(--panel-border);
    border-radius: 1.25rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--panel-border-hover);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(102, 121, 216, 0.08);
}

.card-banner-wrapper {
    position: relative;
    height: 100px;
    overflow: hidden;
    background: #0f132e;
}

.card-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.profile-card:hover .card-banner {
    transform: scale(1.08);
}

.card-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(13, 18, 40, 0.1) 0%, rgba(13, 18, 40, 0.8) 100%);
}

.card-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    gap: 0.4rem;
    z-index: 10;
}

[dir="rtl"] .card-badges {
    left: auto;
    right: 0.75rem;
}

.card-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.badge-verified {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

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

.badge-nitro {
    background: linear-gradient(135deg, #ff3e94, #ff73fa);
    box-shadow: 0 0 10px rgba(255, 62, 148, 0.3);
}

.card-icon-wrapper {
    position: absolute;
    top: 55px;
    left: 1.25rem;
    z-index: 10;
}

[dir="rtl"] .card-icon-wrapper {
    left: auto;
    right: 1.25rem;
}

.card-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 3px solid #0f132e;
    background: #0f132e;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.profile-card:hover .card-icon {
    transform: scale(1.05);
}

.card-content {
    padding: 1.25rem;
    padding-top: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title-container {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.profile-card:hover .card-title {
    color: var(--accent-blue);
}

.card-subtitle {
    font-size: 0.8rem;
    color: #9BA3C7;
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.85rem;
    color: #9BA3C7;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7rem;
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}

.card-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #9BA3C7;
}

.card-stat-icon {
    font-size: 0.8rem;
    color: var(--accent-blue);
    opacity: 0.9;
}

.card-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
}

.card-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-join {
    background: var(--primary-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
}

.btn-join:hover {
    background: var(--hover-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(65, 86, 189, 0.3);
}

.btn-vote {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-vote:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-vote:disabled {
    background: rgba(102, 121, 216, 0.1);
    border-color: rgba(102, 121, 216, 0.2);
    color: var(--accent-blue);
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Detail view banner */
.detail-banner-wrapper {
    position: relative;
    height: 340px;
    margin-top: -88px;
    width: 100%;
    overflow: hidden;
}

.detail-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5, 8, 22, 0.2) 0%, rgba(5, 8, 22, 0.7) 60%, var(--dark-bg) 100%);
}

.detail-header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    margin-top: -80px;
    z-index: 10;
}

.detail-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--dark-bg);
    background: #0f132e;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.detail-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.detail-stat-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(102, 121, 216, 0.25);
    transform: translateY(-2px);
}

/* User connection chips */
.connection-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.connection-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.connection-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.connection-chip.verified-connection {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.05);
}

.connection-chip.verified-connection:hover {
    border-color: rgba(37, 99, 235, 0.5);
    background: rgba(37, 99, 235, 0.1);
}

.connection-github:hover { color: #fff; }
.connection-twitter:hover { color: #1da1f2; }
.connection-youtube:hover { color: #ff0000; }
.connection-twitch:hover { color: #9146ff; }
.connection-spotify:hover { color: #1ed760; }
.connection-steam:hover { color: #66c0f4; }
.connection-website:hover { color: #6679d8; }
.connection-tiktok:hover { color: #ff0050; }

/* Status dot indicator */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid var(--dark-bg);
}
.status-online { background-color: #34d399; }
.status-idle { background-color: #fbbf24; }
.status-dnd { background-color: #f87171; }
.status-offline { background-color: #9ba3c7; }

/* Loading skeleton styles */
.skeleton-card {
    background: rgba(13, 18, 40, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    height: 340px;
    overflow: hidden;
    position: relative;
}

.skeleton-animation {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transform: translateX(-100%);
    animation: skeletonShine 1.5s infinite;
}

@keyframes skeletonShine {
    100% {
        transform: translateX(100%);
    }
}

.skeleton-banner {
    height: 100px;
    background: rgba(255, 255, 255, 0.02);
}

.skeleton-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    margin-left: 1.25rem;
    margin-top: -30px;
    position: relative;
    border: 3px solid #0f132e;
}

[dir="rtl"] .skeleton-icon {
    margin-left: 0;
    margin-right: 1.25rem;
}

.skeleton-line {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

/* Custom 404 Experience Page */
.error-page-container {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.error-card {
    max-width: 500px;
    width: 100%;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(13, 18, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(47, 73, 255, 0.1);
    animation: errorCardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes errorCardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.error-404-number {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #fff 30%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    animation: textPulse 4s ease-in-out infinite alternate;
}

@keyframes textPulse {
    0% {
        text-shadow: 0 0 10px rgba(102, 121, 216, 0.1);
    }
    100% {
        text-shadow: 0 0 30px rgba(102, 121, 216, 0.4);
    }
}

.error-btn {
    padding: 0.8rem 1.75rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.error-btn-primary {
    background: var(--primary-blue);
    color: #fff;
}

.error-btn-primary:hover {
    background: var(--hover-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(65, 86, 189, 0.4);
}

.error-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.error-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Edit profile form styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #9BA3C7;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    color: #fff;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(102, 121, 216, 0.15);
}

.form-select {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: #0d1228;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    color: #fff;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.btn-primary {
    background: var(--primary-blue);
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    background: var(--hover-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(65, 86, 189, 0.4);
}
