/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Apply the main background to the entire body */
    background-image: url('../main-assets/background-01.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #1a1a1a; /* Fallback color */
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

#app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Home Page Specific Layout */
.home-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 40px 20px 20px 20px;
    gap: 30px;
}

/* Image Buttons Base Style */
.home-layout img {
    cursor: pointer;
    object-fit: contain;
    transition: transform 0.2s ease-in-out, filter 0.2s ease;
}

.home-layout img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Specific Image Sizing */
.home-logo {
    width: 105%;         /* Increased from 40% */
    max-width: 525px;   /* Increased from 200px */
    margin-bottom: 20px;
    cursor: default !important; 
}

.home-logo:hover {
    transform: none; 
    filter: none;
}

.home-btn-large {
    width: 100%;
    max-width: 450px;
}

.home-split-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.home-btn-half {
    width: 45%;
    max-width: 200px;
}

.home-btn-circle {
    width: 25%;
    max-width: 120px;
    margin-top: 10px;
}

.home-btn-admin {
    width: 10%;
    max-width: 50px;
    margin-top: auto; /* Pushes the admin button to the very bottom */
    padding-top: 40px;
    opacity: 0.8;
}

.home-btn-admin:hover {
    opacity: 1;
}


/* =========================================
   ADMIN PANEL STYLES
========================================= */

.admin-login-box {
    background: rgba(0, 0, 0, 0.85);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #333;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.admin-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #444;
    border-radius: 6px;
    background: #222;
    color: white;
    font-size: 1rem;
}

.admin-dashboard {
    display: flex;
    min-height: 100vh;
    background-color: #0f172a;
    width: 100%;
}

.admin-sidebar {
    width: 250px;
    background-color: #1e293b;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-right: 1px solid #334155;
}

.btn-sidebar {
    background-color: #334155;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    text-align: left;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-sidebar:hover {
    background-color: var(--primary-color);
}

.admin-stage {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
}

.admin-card {
    background-color: #1e293b;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #334155;
    color: white;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.admin-table th {
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.badge-ielts { background-color: #3b82f6; color: white; }
.badge-teacher { background-color: #a855f7; color: white; }

.admin-activity-log {
    list-style: none;
    margin-top: 15px;
}

.admin-activity-log li {
    padding: 10px 0;
    border-bottom: 1px solid #334155;
    font-size: 0.95rem;
}

.timestamp {
    color: #94a3b8;
    margin-right: 10px;
    font-family: monospace;
}

/* Mobile Responsiveness for Admin Panel */
@media (max-width: 768px) {
    .admin-dashboard {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #334155;
    }
    .admin-stage {
        padding: 15px;
    }
}



/* =========================================
   VOICE & TEXT CHAT APP STYLES
========================================= */

.chat-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
    background-color: #36393f;
    color: #dcddde;
    overflow: hidden;
}

/* Left Sidebar: Channels */
.chat-sidebar-left {
    width: 240px;
    background-color: #2f3136;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-server-header {
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    font-weight: bold;
    color: white;
}

.channel-group {
    padding: 16px 8px 0;
}

.channel-category {
    font-size: 0.75rem;
    color: #8e9297;
    margin-bottom: 8px;
    padding-left: 8px;
}

.channel-item {
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #8e9297;
    transition: background 0.1s, color 0.1s;
}

.channel-item:hover {
    background-color: #393c43;
    color: #dcddde;
}

.channel-item.active {
    background-color: #393c43;
    color: #ffffff;
}

.channel-item .hash {
    font-size: 1.2rem;
    margin-right: 6px;
    color: #72767d;
}

.voice-users-list {
    padding-left: 24px;
    font-size: 0.85rem;
    color: #8e9297;
}

.chat-user-controls {
    margin-top: auto;
    background-color: #292b2f;
    padding: 10px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info { display: flex; align-items: center; gap: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-color); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; }
.details { display: flex; flex-direction: column; font-size: 0.8rem; }
.details .username { color: white; font-weight: bold; }
.details .status { color: #4ade80; }

.control-btn { background: transparent; border: none; font-size: 1.2rem; cursor: pointer; border-radius: 4px; padding: 4px; transition: background 0.2s; }
.control-btn:hover { background-color: #393c43; }

/* Center: Chat Area */
.chat-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #36393f;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid #202225;
    color: white;
}

.chat-messages-container {
    flex-grow: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 12px;
}

.chat-message .msg-avatar { width: 40px; height: 40px; border-radius: 50%; background: #5865f2; }
.chat-message .msg-content .msg-header { display: flex; gap: 8px; align-items: baseline; }
.chat-message .msg-name { color: white; font-weight: 500; cursor: pointer; }
.chat-message .msg-name:hover { text-decoration: underline; }
.chat-message .msg-time { font-size: 0.75rem; color: #72767d; }
.chat-message .msg-text { margin-top: 4px; line-height: 1.4; }

.chat-input-wrapper {
    padding: 16px;
    display: flex;
    gap: 12px;
}

#chat-input {
    flex-grow: 1;
    background-color: #40444b;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-size: 1rem;
}

#chat-input:focus { outline: none; }

.btn-send {
    background-color: #5865f2;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    font-weight: bold;
    cursor: pointer;
}
.btn-send:hover { background-color: #4752c4; }

/* Right Sidebar: Users */
.chat-sidebar-right {
    width: 240px;
    background-color: #2f3136;
    padding: 16px 8px;
    flex-shrink: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .chat-sidebar-right { display: none; } /* Hide user list on mobile */
    .chat-sidebar-left { width: 200px; }
}
@media (max-width: 500px) {
    .chat-sidebar-left { display: none; } /* Requires a hamburger menu toggle later */
}
