:root {
    --bg-main: #050505;
    --bg-card: rgba(15, 15, 20, 0.8);
    --primary: #00f2ff;
    --primary-glow: rgba(0, 242, 255, 0.5);
    --secondary: #7000ff;
    --secondary-glow: rgba(112, 0, 255, 0.5);
    --accent: #ff00c8;
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.03);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 0% 0%, var(--secondary-glow) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, var(--primary-glow) 0%, transparent 40%);
    background-attachment: fixed;
}

/* Premium Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-logo {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.5; transform: scale(0.95); }
}

/* App Container */
.app-container {
    max-width: 500px;
    margin: 0 auto;
    padding-bottom: 100px;
}

/* Header */
.header {
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass);
    padding: 5px 15px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.vip-tag {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--accent);
}

/* Main Content */
.main-content {
    padding: 20px;
}

/* Hero Card */
.hero-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.3;
}

.hero-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 15px var(--primary));
}

.hero-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.feature-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-item:active {
    transform: scale(0.95);
    border-color: var(--primary);
    background: rgba(0, 242, 255, 0.05);
}

.f-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.feature-item h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.feature-item p {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* Stats Section */
.stats-container {
    background: var(--glass);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: space-around;
    border: 1px solid var(--border);
    margin-bottom: 25px;
}

.stat-box {
    text-align: center;
}

.stat-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Action Buttons */
.action-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-premium {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #000;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(0, 242, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-premium:active {
    transform: translateY(2px);
    box-shadow: 0 5px 10px rgba(0, 242, 255, 0.1);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-outline:active {
    background: var(--glass);
}

/* Navigation Bar */
.nav-bar {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 400px;
    background: rgba(15, 15, 20, 0.8);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 10px;
    display: flex;
    justify-content: space-around;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: var(--primary);
    background: rgba(0, 242, 255, 0.1);
}

.nav-item i {
    font-size: 1.4rem;
}

.nav-item span {
    font-size: 0.65rem;
    font-weight: 700;
}

/* Project Cards */
.project-card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.project-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.project-card-premium h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.project-card-premium p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 15px;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 700;
}

/* Chat Interface */
.chat-wrapper {
    height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
}

.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msg-bubble {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.msg-ai {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom-right-radius: 4px;
}

.msg-user {
    align-self: flex-end;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #000;
    font-weight: 600;
    border-bottom-left-radius: 4px;
}

.input-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.chat-field {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px;
    outline: none;
    font-size: 0.9rem;
}

.send-btn-premium {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    background: var(--primary);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-premium {
    background: #111;
    width: 100%;
    max-width: 450px;
    border-radius: 30px;
    border: 1px solid var(--border);
    padding: 30px;
    position: relative;
}

.modal-premium h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
}

.input-premium {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 15px;
    color: #fff;
    margin-bottom: 15px;
    outline: none;
}

.input-premium:focus {
    border-color: var(--primary);
}

/* Toast */
.premium-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 12px 25px;
    border-radius: 50px;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.3);
    display: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

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

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

@keyframes slideDown {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translate(-50%, 0); opacity: 1; }
    to { transform: translate(-50%, -100%); opacity: 0; }
}

/* Premium Scrollbar for Chat */
.chat-messages-area::-webkit-scrollbar {
    width: 3px;
}
.chat-messages-area::-webkit-scrollbar-thumb {
    background: var(--primary-glow);
    border-radius: 10px;
}
