@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
    --primary: #2f6df6;
    --bg: #f5f6fa;
    --card: #ffffff;
    --text: #222222;
    --border: #e1e4e8;
}

body.dark {
    --primary: #4a84fa;
    --bg: #121212;
    --card: #1e1e1e;
    --text: #ffffff;
    --border: #333333;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body { 
    background-color: var(--bg); 
    color: var(--text); 
    padding-top: 70px; /* Appbar space */
    padding-bottom: 80px; /* Bottom bar space */
    transition: 0.3s background, 0.3s color;
}

/* Appbar - Centered Logo */
.appbar {
    position: fixed; top: 0; width: 100%; height: 60px;
    background: var(--card);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 100;
    transition: 0.3s;
}
.appbar .logo {
    font-size: 18px; font-weight: 600; color: var(--primary);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    flex: 1;
}
.appbar .logo img { width: 26px; }
.icon-btn {
    background: none; border: none; font-size: 22px; color: var(--text); cursor: pointer;
}

/* Sidebar (Drawer) */
.sidebar {
    position: fixed; top: 0; left: -280px; width: 280px; height: 100%;
    background: var(--card); z-index: 200;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
}
.sidebar.active { left: 0; }
.sidebar-header {
    padding: 30px 20px; background: var(--primary); color: white;
    border-bottom-right-radius: 20px;
}
.sidebar-links { padding: 20px 0; list-style: none; }
.sidebar-links li a {
    display: flex; align-items: center; gap: 15px; padding: 15px 25px;
    color: var(--text); text-decoration: none; font-size: 15px; transition: 0.2s;
}
.sidebar-links li a:hover { background: rgba(47, 109, 246, 0.1); color: var(--primary); border-radius: 0 20px 20px 0; }

.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 150;
    visibility: hidden; opacity: 0; transition: 0.3s;
}
.overlay.active { visibility: visible; opacity: 1; }

/* Bottom Navigation */
.bottom-nav {
    position: fixed; bottom: 0; width: 100%;
    background: var(--card);
    display: flex; justify-content: space-around;
    padding: 12px 0 15px 0;
    box-shadow: 0 -2px 15px rgba(0,0,0,0.06);
    z-index: 100; border-top-left-radius: 20px; border-top-right-radius: 20px;
    transition: 0.3s;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center;
    color: #888; text-decoration: none; font-size: 11px; gap: 6px;
    transition: 0.2s;
}
.nav-item.active, .nav-item:hover { color: var(--primary); font-weight: 500; transform: translateY(-3px); }
.nav-item i { font-size: 22px; }

/* General Layout & Cards */
.container { padding: 15px; max-width: 500px; margin: auto; }
.card {
    background: var(--card); padding: 20px; border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); margin-bottom: 18px;
    border: 1px solid var(--border); transition: 0.3s;
}

/* Pro Banner for Home */
.pro-banner {
    background: linear-gradient(135deg, var(--primary), #82a8fb);
    color: white; padding: 20px; border-radius: 16px; margin-bottom: 25px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 5px 15px rgba(47, 109, 246, 0.3);
}
.pro-banner h3 { font-size: 18px; margin-bottom: 5px; }
.pro-banner p { font-size: 13px; opacity: 0.9; }
.pro-banner i { font-size: 35px; opacity: 0.8; }

/* Tools Grid */
.grid-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.tool-card { text-align: center; cursor: pointer; padding: 25px 15px; }
.tool-icon { font-size: 32px; color: var(--primary); margin-bottom: 15px; }
.tool-card h4 { font-size: 14px; color: var(--text); }
.tool-card p { font-size: 12px; color: #888; margin-top: 5px; }

/* Inputs & Forms */
label { font-size: 13px; font-weight: 600; color: #777; margin-bottom: 8px; display: block; }
input, select {
    width: 100%; padding: 14px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--bg);
    color: var(--text); font-size: 16px; outline: none; transition: 0.2s;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.15); }
.result {
    margin-top: 18px; padding: 15px; background: rgba(47, 109, 246, 0.08);
    border-radius: 12px; color: var(--primary); font-size: 18px; font-weight: 600; text-align: center;
}
.hidden { display: none !important; }


/* Sidebar Profile Styling */
.profile-img-container {
    margin-bottom: 12px;
}

.sidebar-user-img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
}

.profile-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.profile-info p {
    font-size: 12px;
    opacity: 0.9;
}

/* Sidebar Menu Labels */
.menu-label {
    padding: 20px 25px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    font-weight: bold;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: #999;
}

/* GitHub Link Special Hover */
.sidebar-links li a[href*="github"]:hover {
    color: #333; /* GitHub default dark */
    background: rgba(0,0,0,0.05);
}

body.dark .sidebar-links li a[href*="github"]:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}