* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #05070c;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e2e8f0;
    overflow: hidden;
    position: relative;
}

.bg-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(212, 175, 55, 0.05), transparent 40%),
                radial-gradient(circle at 70% 80%, rgba(37, 99, 235, 0.05), transparent 45%);
    z-index: 1;
}

.app-container {
    position: relative;
    width: 450px;
    height: 85vh;
    display: flex;
    z-index: 2;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 
                0 0 40px rgba(212, 175, 55, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.chat-container {
    flex: 1;
    background: rgba(10, 14, 23, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative; /* بۆ وێ چەندێ لاپەرێن دی ل سەر لێبکەڤن */
}

.chat-header {
    padding: 20px;
    background: rgba(18, 24, 38, 0.6);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 4;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle-btn, .close-menu-btn {
    background: transparent;
    border: none;
    color: #ffd700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}

.ai-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #ffd700;
    border-radius: 50%;
    box-shadow: 0 0 12px #ffd700;
}

.chat-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #fff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.model-badge {
    background: rgba(212, 175, 55, 0.1);
    color: #ffd700;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid rgba(212, 175, 55, 0.25);
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 25px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
}

.message {
    max-width: 82%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    animation: slideUp 0.35s cubic-bezier(0.25, 1, 0.50, 1) both;
}

.user-message {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #f1f5f9;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-message {
    background: rgba(28, 35, 51, 0.45);
    color: #f8fafc;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.08);
}

.chat-input-area {
    padding: 20px;
    background: rgba(11, 15, 26, 0.9);
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.08);
    z-index: 4;
}

.input-wrapper {
    flex: 1;
}

.chat-input-area input {
    width: 100%;
    background: rgba(20, 27, 43, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 20px;
    border-radius: 14px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s ease;
}

.chat-input-area input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.chat-input-area button {
    background: linear-gradient(45deg, #bf953f, #fcf6ba, #b38728, #fbf5b7);
    background-size: 300% 100%;
    color: #05070c;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(179, 135, 40, 0.3);
}

.chat-input-area button:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* ستایلێ مێنیوا تەنشتێ (Sidebar) */
.sidebar {
    position: absolute;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100%;
    background: rgba(8, 11, 18, 0.95);
    backdrop-filter: blur(25px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(212, 175, 55, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    padding: 22px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header h3 {
    font-size: 1.1rem;
    color: #ffd700;
}

.sidebar-links {
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.sidebar-links a {
    color: #94a3b8;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
}

.sidebar-links a:hover, .sidebar-links a.active {
    color: #ffd700;
    background: rgba(212, 175, 55, 0.08);
}

.sidebar-footer {
    padding: 15px 20px;
    font-size: 0.8rem;
    color: #475569;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── ستایلێ لاپەرێن نووی یێن مێنیویێ (Overlay Pages) ── */
.menu-overlay-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    z-index: 5;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%); /* د شاردراوەنە ل خوارێ */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-overlay-page.active {
    transform: translateY(0); /* دهێتە سەرێ */
}

.back-to-chat {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #ffd700;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    align-self: flex-start;
    font-size: 0.9rem;
    transition: 0.2s;
}

.back-to-chat:hover {
    background: rgba(212, 175, 55, 0.1);
}

.page-content {
    margin-top: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.page-icon {
    font-size: 3.5rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.page-content h3 {
    font-size: 1.5rem;
    color: #fff;
}

.page-content p {
    color: #94a3b8;
    line-height: 1.7;
    font-size: 1rem;
    max-width: 90%;
}

.dev-credits, .settings-list {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 14px;
    width: 100%;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.setting-item:last-child { border: none; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
