@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css');

:root {
    --gold: #ffd700;
    --dark: #0f0c29;
    --purple: #302b63;
    --navy: #24243e;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow: 0 20px 40px rgba(0,0,0,0.3);
    --shadow-hover: 0 30px 60px rgba(0,0,0,0.4);
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, var(--dark), var(--purple), var(--navy));
    color: #fff;
    min-height: 100vh;
    direction: rtl;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255,255,255,0.15);
    z-index: 1000;
    transition: all 0.4s;
    padding: 20px;
}
.sidebar.active { right: -280px; }
.sidebar-header h3 { color: var(--gold); text-align: center; font-size: 2rem; margin-bottom: 40px; font-weight: 900; }
.components a { display: block; padding: 16px 20px; color: #fff; text-decoration: none; border-radius: 16px; margin-bottom: 8px; font-weight: 600; transition: all 0.3s; }
.components a:hover, .components li.active a { background: rgba(255,215,0,0.2); color: var(--gold); transform: translateX(-8px); }
.sidebar-footer { position: absolute; bottom: 30px; left: 20px; right: 20px; text-align: center; }
.logout-btn { background: rgba(231,76,60,0.4); padding: 12px; border-radius: 50px; color: white; text-decoration: none; display: block; margin-top: 15px; }

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 280px;
    height: 70px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 999;
    transition: all 0.4s;
}
.topbar.active { right: 0; }
.toggle { font-size: 1.9rem; color: var(--gold); cursor: pointer; }
.user span { font-weight: 700; color: var(--gold); }

/* Content */
.content {
    margin-right: 280px;
    padding: 100px 30px 40px;
    transition: all 0.4s;
}
.content.active { margin-right: 0; }
.page-title {
    text-align: center;
    font-size: 3.2rem;
    margin-bottom: 40px;
    background: linear-gradient(90deg, #ffd700, #ff8a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

/* Grid & Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; margin-bottom: 40px; }
.card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.4s;
}
.card:hover { transform: translateY(-15px); border-color: var(--gold); }
.card h3 { font-size: 3rem; background: linear-gradient(90deg, #ffd700, #ff8a00); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Buttons */
.btn-big { padding: 16px 40px; border-radius: 50px; font-weight: 800; font-size: 1.2rem; text-decoration: none; display: inline-block; transition: all 0.4s; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.btn-gold { background: linear-gradient(45deg, #ffd700, #ff8a00); color: #000; }
.btn-cyan { background: linear-gradient(45deg, #00f2fe, #4facfe); color: #fff; }
.btn-big:hover { transform: translateY(-8px) scale(1.05); box-shadow: var(--shadow-hover); }

/* Tokens Box */
.tokens-box {
    background: #000;
    color: #0f0;
    padding: 30px;
    border-radius: 20px;
    font-family: 'Courier New', monospace;
    max-height: 60vh;
    overflow-y: auto;
    border: 2px solid #0f0;
    box-shadow: 0 0 30px rgba(0,255,0,0.3);
    position: relative;
    margin: 30px 0;
}
.tokens-box::before { content: "TOKENS OUTPUT"; position: absolute; top: -15px; left: 20px; background: #000; padding: 0 15px; color: #0f0; font-weight: bold; }