/* ========================================
   PROFIL / DASHBOARD - FULL DARK CSS
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #121212 0%, #1e1e1e 100%);
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1f1f1f;
    padding: 20px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    margin-right: 12px;
    transition: transform 0.3s ease;
    border-radius: 10px;
    width: 50px;
    height: 50px;
    object-fit: cover;
}
.logo img:hover {
    transform: scale(1.1);
}
.logo span {
    font-size: 1em;
    font-weight: 700;
    color: #f0b90b;
    letter-spacing: 0.5px;
}

/* Navbar Desktop */
.navbar ul {
    display: flex;
    list-style: none;
    gap: 30px;
}
.navbar a {
    text-decoration: none;
    color: #bbbbbb;
    font-weight: 600;
    font-size: 1em;
    transition: color 0.3s ease;
}
.navbar a:hover, .navbar a.active {
    color: #f0b90b;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}
.hamburger span {
    width: 25px;
    height: 3px;
    background: #bbbbbb;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* Sidebar (Mobile) */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: #1f1f1f;
    box-shadow: 2px 0 15px rgba(0,0,0,0.5);
    transition: left 0.4s ease;
    z-index: 1000;
    padding: 90px 20px 20px;
    overflow-y: auto;
    display: none;
}
.sidebar.active { left: 0; }
.sidebar a {
    display: block;
    padding: 12px 0;
    color: #bbbbbb;
    font-weight: 600;
    font-size: 1.1em;
    text-decoration: none;
    border-bottom: 1px solid #333;
    transition: color 0.3s;
}
.sidebar a:hover, .sidebar a.active { color: #f0b90b; }

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

/* Hero */
.profile-hero { 
    padding: 40px 20px; 
    background: #1a1a1a; 
}
.hero-content { 
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    border: solid 1px #444;
    border-radius: 10px;
    box-shadow: 6px 6px #2c2c2c;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}
.dashboard-text h1 { 
    color: #f0b90b; 
    font-size: 2.5em; 
    font-weight: 800; 
}
.dashboard-buttons { 
    display: flex; 
    justify-content: flex-end; 
    gap: 15px; 
}

/* Stats Grid – 4 columns desktop */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px auto;
    max-width: 1000px;
}
.stat-card {
    background: #1f1f1f;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    text-align: center;
    transition: transform .3s;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-card h3 { 
    color: #f0b90b; 
    font-size: 1.1em; 
    margin-bottom: 8px; 
}
.stat-card p { 
    font-size: 1.6em; 
    font-weight: 700; 
    color: #e0e0e0; 
}

/* Buttons */
.connect-btn, .create-lesson-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0b90b, #d9a008);
    color: #1a1a1a;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
}
.connect-btn:hover, .create-lesson-btn:hover {
    background: linear-gradient(90deg, #d9a008, #f0b90b);
    transform: translateY(-2px);
}
.connect-btn.connected {
    background: linear-gradient(90deg, #333, #555);
    color: #fff;
}

/* Content List */
.content-list { 
    padding: 40px 20px; 
}
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
}
.filters { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 20px; 
    gap: 20px; 
}
#searchInput { 
    flex: 1; 
    padding: 12px; 
    border: 1px solid #444; 
    border-radius: 8px; 
    background: #2c2c2c; 
    color: #e0e0e0; 
}
#sortSelect { 
    padding: 12px; 
    border: 1px solid #444; 
    border-radius: 8px; 
    background: #2c2c2c; 
    color: #e0e0e0; 
}
.content-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
}
.content-item {
    background: #1f1f1f;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform .3s;
}
.content-item:hover { 
    transform: translateY(-5px); 
}
.content-item img { 
    width: 100%; 
    height: 150px; 
    object-fit: cover; 
    border-radius: 8px; 
    margin-bottom: 10px; 
}
.content-item .owner-address { 
    font-size: 0.9em; 
    color: #f0b90b; 
    font-weight: 600; 
}
.content-item h3 { 
    font-size: 1.2em; 
    color: #e0e0e0; 
    margin: 10px 0; 
}
.content-item p { 
    font-size: 0.95em; 
    color: #aaaaaa; 
}

/* Pagination */
.pagination { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 20px; 
    margin-top: 30px; 
}
.pagination button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0b90b, #d9a008);
    color: #1a1a1a;
    font-weight: 600;
    cursor: pointer;
}
.pagination button:disabled { 
    background: #444; 
    cursor: not-allowed; 
    color: #888;
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.popup-content {
    background: #1f1f1f;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid #333;
}
.popup-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.popup-btn:not(.cancel) { 
    background: linear-gradient(90deg, #f0b90b, #d9a008); 
    color: #1a1a1a; 
}
.popup-btn.cancel { 
    background: #444; 
    color: #e0e0e0; 
}

/* Responsive */
@media (max-width: 768px) {
    header { padding: 15px 10px; }
    .hamburger { display: flex; }
    .navbar { display: none; }
    .sidebar { display: block; }
    .dashboard-grid { grid-template-columns: 1fr; text-align: center; }
    .dashboard-buttons { justify-content: center; flex-wrap: wrap; }
    .connect-btn, .create-lesson-btn { width: 100%; max-width: 200px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .stat-card p { font-size: 1.4em; }
    .filters { flex-direction: column; }
    .content-grid { grid-template-columns: 1fr; }
    .content-item img { height: 120px; }
    .content-item p { 
        white-space: normal; 
        display: -webkit-box; 
        -webkit-line-clamp: 3; 
        -webkit-box-orient: vertical; 
    }
    .pagination { flex-direction: column; }
}