/* Gen-Z Gaming Theme - Persian RTL */

:root {
    /* Gen-Z Color Palette */
    --primary-purple: #6c5ce7;
    --secondary-pink: #fd79a8;
    --accent-cyan: #00cec9;
    --accent-yellow: #fdcb6e;
    --dark-bg: #0f0f23;
    --darker-bg: #0a0a1a;
    --card-bg: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --gradient-1: linear-gradient(135deg, #6c5ce7, #fd79a8);
    --gradient-2: linear-gradient(135deg, #00cec9, #6c5ce7);
    --gradient-3: linear-gradient(135deg, #fd79a8, #fdcb6e);
    --shadow-neon: 0 0 20px rgba(108, 92, 231, 0.3);
    --shadow-pink: 0 0 20px rgba(253, 121, 168, 0.3);
    --shadow-cyan: 0 0 20px rgba(0, 206, 201, 0.3);
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    direction: rtl;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background: var(--dark-bg);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(253, 121, 168, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(0, 206, 201, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(120deg); }
    66% { transform: translate(20px, 20px) rotate(240deg); }
}

/* Loading Animation */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: var(--darker-bg);
}

.gaming-loader {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loader-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    border: 3px solid transparent;
    animation: loadingSpin 2s linear infinite;
}

.loader-ring:nth-child(1) {
    border-top-color: var(--primary-purple);
    animation-delay: 0s;
}

.loader-ring:nth-child(2) {
    border-right-color: var(--secondary-pink);
    animation-delay: 0.5s;
    width: 60px;
    height: 60px;
}

.loader-ring:nth-child(3) {
    border-bottom-color: var(--accent-cyan);
    animation-delay: 1s;
    width: 40px;
    height: 40px;
}

@keyframes loadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 100px;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-2);
    border-radius: 2px;
}

/* Cards */
.gaming-card {
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(108, 92, 231, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gaming-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.gaming-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-neon);
    border-color: var(--primary-purple);
}

.gaming-card:hover::before {
    opacity: 0.1;
}

/* Buttons */
.btn-gaming {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}

.btn-gaming::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;
}

.btn-gaming:hover::before {
    left: 100%;
}

.btn-gaming:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-neon);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-purple);
    color: var(--primary-purple);
}

.btn-secondary:hover {
    background: var(--primary-purple);
    color: white;
}

/* Navigation */
.navbar {
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(108, 92, 231, 0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-purple);
}

.nav-link.active {
    color: var(--primary-purple);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Game Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(108, 92, 231, 0.1);
}

.game-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-neon);
}

.game-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.game-content {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.game-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.game-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(108, 92, 231, 0.2);
    color: var(--primary-purple);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Form Styles - Gaming Theme */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.login-card {
    padding: 3rem 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-icon {
    font-size: 3.5rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary-purple);
    font-size: 1rem;
}

.form-input,
.search-input,
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

.form-input::placeholder,
.search-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-secondary);
    text-align: right;
}

.form-input:focus,
.search-input:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(26, 26, 46, 0.9);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.3);
}

.form-input:hover,
.search-input:hover,
input:hover,
textarea:hover,
select:hover {
    border-color: var(--primary-purple);
}

/* Error and Success Messages */
.error-message {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: 12px;
    padding: 1rem;
    color: #ff4757;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.error-message i {
    font-size: 1.2rem;
}

.success-message {
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.3);
    border-radius: 12px;
    padding: 1rem;
    color: #2ed573;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.success-message i {
    font-size: 1.2rem;
}

/* Form Actions */
.form-actions {
    margin-top: 2rem;
}

.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1.1rem 2rem;
    font-size: 1.05rem;
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* User Management Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

.search-box i {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-input {
    padding-right: 3rem;
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.user-card {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.user-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-purple);
    box-shadow: var(--shadow-neon);
}

.user-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-username {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    position: absolute;
    left: 0;
    top: 0;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-status.active {
    background: rgba(46, 213, 115, 0.2);
    color: #2ed573;
    border: 1px solid rgba(46, 213, 115, 0.3);
}

.user-status.inactive {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.user-actions {
    display: flex;
    gap: 0.7rem;
    margin-top: 1rem;
}

.btn-action {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-edit {
    background: rgba(0, 206, 201, 0.2);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 206, 201, 0.3);
}

.btn-edit:hover {
    background: var(--accent-cyan);
    color: white;
    box-shadow: var(--shadow-cyan);
}

.btn-delete {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-delete:hover {
    background: #ff4757;
    color: white;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.3);
}

/* No Data State */
.no-data {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-data i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-data p {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Loading State */
.loader-text {
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 1rem;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-2);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Gaming specific animations */
.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(108, 92, 231, 0.6), 0 0 30px rgba(253, 121, 168, 0.3);
    }
}