/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    height: 100vh;
    display: flex;
}

/* Left third - black */
body::before {
    content: '';
    width: 33.333%;
    background-color: black;
    height: 100vh;
}

/* Main content - right two thirds - white */
main {
    width: 66.666%;
    background-color: white;
    height: 100vh;
    overflow-y: auto;
}

.content {
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.left-panel {
    position: fixed;
    left: 0;
    top: 0;
    width: 33.333%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* keep clicks for right side */
}

.left-panel img {
    max-width: 80%;
    height: auto;
}

h1 {
    font-size: 4rem;
    font-weight: bold;
    color: black;
    text-align: center;
    margin-bottom: 2rem;
}

/* Auth container */
.auth-container {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #000000;
    border-bottom-color: #000000;
}

.tab-btn:hover {
    color: #000000;
}

.auth-form h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.auth-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: #000000;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.auth-form button:hover {
    background-color: #222222;
}

#userInfo {
    text-align: center;
}

#userInfo h2 {
    color: #28a745;
    margin-bottom: 1rem;
}

#userInfo button {
    background-color: #dc3545;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#userInfo button:hover {
    background-color: #c82333;
}

/* Main page styles */
.main-container {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.welcome-section {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.welcome-section h2 {
    color: #28a745;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.welcome-section p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

.dashboard {
    margin-bottom: 2rem;
}

.dashboard h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.dashboard-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dashboard-item h4 {
    color: #007bff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.dashboard-item p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* Profile form */
.profile {
    max-width: 720px;
    margin: 24px auto;
}

.profile h2 {
    margin-bottom: 16px;
}

.profile-form {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.profile-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-form .field {
    display: flex;
    flex-direction: column;
}

.profile-form label {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 6px;
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.profile-form .save-btn {
    margin-top: 14px;
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.profile-form .save-btn:hover {
    background: #222222;
}

@media (max-width: 768px) {
    .profile-form .row {
        grid-template-columns: 1fr;
    }
}

.actions {
    text-align: center;
}

.logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #c82333;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    body::before {
        width: 100%;
        height: 33.333vh;
    }
    
    .left-panel {
        position: static;
        width: 100%;
        height: 33.333vh;
        padding-top: 24px;
    }

    .left-panel img {
        max-height: 120px;
        max-width: 60%;
    }

    main {
        width: 100%;
        height: auto;
        min-height: 66.666vh;
    }
    
    .content {
        padding: 1rem;
        max-width: 90%;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .auth-container {
        padding: 1.5rem;
    }
    
    .auth-tabs {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Main page overrides */
.main-page {
    display: block;
    height: auto;
    background: white;
}

.main-page::before {
    content: none;
}

.topbar {
    position: sticky;
    top: 0;
    width: 100%;
    height: 56px;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
}

.topbar .brand {
    font-weight: 700;
}

.hamburger {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    z-index: 1200; /* keep tappable above overlays */
    -webkit-tap-highlight-color: transparent;
}

.hamburger .material-symbols-outlined {
    font-size: 28px;
    line-height: 1;
    color: #ffffff;
}

.layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 56px);
}

.sidebar {
    background: #111111;
    color: #ffffff;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.sidebar-item {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    background: #181818;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.sidebar-item:hover {
    background: #222222;
    border-color: #333333;
}

.sidebar-item.danger {
    border-color: #5a1a1f;
    background: #3a0f12;
}

.sidebar-item.danger:hover {
    background: #4a1418;
    border-color: #6a1f25;
}

.sidebar-item.active {
    background: #333333;
    border-color: #444444;
}

.main-content {
    background: #ffffff;
    padding: 24px;
    overflow-y: auto;
}

/* Mobile responsive for main page */
@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        min-height: calc(100vh - 56px);
    }

    .sidebar {
        width: 100%;
        padding-top: 0;
    }

    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        padding: 12px 16px;
        border-bottom: 1px solid #333;
    }

    .sidebar-item {
        padding: 8px 10px;
        font-size: 0.9rem;
        text-align: center;
        flex: 1;
        margin: 0 4px;
    }

    .main-content {
        padding: 16px;
    }
    
    .profile {
        max-width: 100%;
        margin: 16px auto;
    }
    
    .profile-form {
        padding: 12px;
    }
}

/* Wall view styles */
.wall {
    max-width: 800px;
    margin: 0 auto;
}

.wall h2 {
    margin-bottom: 24px;
    color: #333;
}

.wall-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-composer {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.post-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.post-textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.post-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.post-btn:hover {
    background: #222222;
}

.posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-author {
    font-weight: 600;
    color: #333;
}

.post-time {
    font-size: 0.9rem;
    color: #6b7280;
}

.post-content {
    color: #374151;
    line-height: 1.5;
}

/* Mobile responsive for wall */
@media (max-width: 768px) {
    .wall {
        max-width: 100%;
    }
    
    .post-composer {
        padding: 16px;
    }
    
    .post {
        padding: 16px;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
