/* assets/css/style.css */

:root {
    /* Color Palette Inspired by Discord Premium Themes */
    --bg-main: #1e1f22;
    --bg-secondary: #2b2d31;
    --bg-tertiary: #313338;

    --brand-color: #5865F2;
    --brand-hover: #4752c4;

    --text-normal: #dbdee1;
    --text-muted: #949ba4;
    --text-header: #f2f3f5;

    --status-online: #23a559;
    --status-offline: #80848e;

    --panel-bg: rgba(43, 45, 49, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-round: 50%;

    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-normal);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 60px;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-header);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--brand-color);
    font-weight: 800;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 8px 12px 8px 36px;
    color: var(--text-normal);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    border-color: var(--brand-color);
    background-color: var(--bg-secondary);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-actions button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.header-actions button:hover {
    color: var(--text-header);
    background-color: var(--bg-secondary);
}

/* Dashboard Layout */
.dashboard-wrap {
    padding: 84px 24px 24px;
    /* 60px header + 24px top spacing */
    max-width: 1200px;
    margin: 0 auto;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-header);
}

/* Buttons */
.btn-primary {
    background-color: var(--brand-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Profiles Grid */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.profile-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.profile-card:hover {
    background-color: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.15);
}

.avatar-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-round);
    object-fit: cover;
    background-color: var(--bg-main);
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-round);
    border: 3px solid var(--bg-secondary);
    background-color: var(--status-online);
}

.profile-card:hover .status-indicator {
    border-color: var(--bg-tertiary);
}

.status-offline {
    background-color: var(--status-offline);
}

.profile-info {
    flex-grow: 1;
    overflow: hidden;
}

.profile-username {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-header);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-userid {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-actions {
    opacity: 0;
    transition: var(--transition);
}

.profile-card:hover .profile-actions {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-icon:hover {
    color: #ed4245;
    /* Red for delete */
    background-color: rgba(237, 66, 69, 0.1);
}

/* Modal Overlay (Glassmorphism) */
.modal-overlay,
.session-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity var(--transition);
}

.modal-content {
    background-color: var(--bg-tertiary);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(1);
    transition: transform var(--transition);
}

.glass-panel {
    background: var(--panel-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    color: var(--text-header);
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--text-header);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.alert-info {
    background-color: rgba(88, 101, 242, 0.1);
    border-left: 4px solid var(--brand-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-normal);
}

.iframe-container {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-main);
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Forms */
.form-control {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-normal);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-color);
}

/* Session Fullscreen View */
.session-overlay {
    background-color: var(--bg-main);
    flex-direction: column;
    justify-content: flex-start;
}

.session-header {
    width: 100%;
    height: 48px;
    background-color: var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
}

.session-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.session-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-round);
}

.session-username {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-header);
}

.session-body {
    flex-grow: 1;
    width: 100%;
    background-color: var(--bg-main);
}

.session-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Skeleton Loader */
.skeleton {
    animation: shimmer 1.5s infinite linear;
    background: linear-gradient(to right, var(--bg-secondary) 4%, var(--bg-tertiary) 25%, var(--bg-secondary) 36%);
    background-size: 1000px 100%;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}