/* Clean Minimalistic Monospace Theme (Human-Made Aesthetic) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: #0c0c0e;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    overflow: hidden;
    color: #e4e4e7;
    -webkit-font-smoothing: antialiased;
}

.video-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

/* Fullscreen Video */
#player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    outline: none;
    border: none;
}

/* Top Nav Layout - Top Right Position */
.top-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

/* Clean text buttons */
.nav-btn {
    padding: 8px 16px;
    background: #18181b;
    border: 1px solid #27272a;
    color: #e4e4e7;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-btn:hover {
    background: #27272a;
    border-color: #3f3f46;
}

.nav-btn:active {
    background: #18181b;
}

/* Fallback Play Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 14, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

.overlay.hidden {
    display: none;
}

.overlay-card {
    text-align: center;
    background: #18181b;
    border: 1px solid #27272a;
    padding: 30px;
    border-radius: 6px;
    max-width: 380px;
    width: 100%;
}

.overlay-text {
    color: #a1a1aa;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Minimalist Modal Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 14, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

/* Modal Card */
.modal-card {
    background: #18181b;
    border: 1px solid #27272a;
    width: 100%;
    max-width: 460px;
    border-radius: 6px;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Header & Close Button */
.modal-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.close-btn {
    background: transparent;
    border: 1px solid #27272a;
    color: #a1a1aa;
    font-family: inherit;
    font-size: 0.78rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.1s ease, border-color 0.1s ease;
}

.close-btn:hover {
    color: #f4f4f5;
    border-color: #3f3f46;
}

/* View Titles & Subtitles */
.modal-view {
    width: 100%;
}

.modal-view.hidden {
    display: none;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #f4f4f5;
    letter-spacing: -0.01em;
}

.modal-subtitle {
    font-size: 0.8rem;
    color: #71717a;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Form Styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #a1a1aa;
    margin-bottom: 6px;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: #0f0f11;
    border: 1px solid #27272a;
    border-radius: 4px;
    padding: 10px 12px;
    color: #f4f4f5;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: #52525b;
}

/* Actions and Buttons */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid transparent;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.btn-primary {
    background: #e4e4e7;
    color: #18181b;
}

.btn-primary:hover {
    background: #ffffff;
}

.btn-secondary {
    background: #18181b;
    border-color: #27272a;
    color: #a1a1aa;
}

.btn-secondary:hover {
    background: #27272a;
    color: #f4f4f5;
}

.btn-danger {
    background: #18181b;
    border-color: #7f1d1d;
    color: #f87171;
}

.btn-danger:hover {
    background: #7f1d1d;
    color: #fff;
}

.btn-link {
    background: transparent;
    color: #a1a1aa;
    padding: 0;
    text-decoration: underline;
}

.btn-link:hover {
    color: #f4f4f5;
}

/* Status logs */
.status-msg {
    margin-top: 12px;
    font-size: 0.8rem;
    text-align: center;
}

.status-msg.success {
    color: #34d399;
}

.status-msg.error {
    color: #f87171;
}

/* Inbox panel */
.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #27272a;
    padding-bottom: 10px;
}

.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 50vh;
    overflow-y: auto;
}

.loading-msg {
    text-align: center;
    color: #71717a;
    font-size: 0.8rem;
    padding: 15px 0;
}

.message-item {
    background: #0f0f11;
    border: 1px solid #27272a;
    border-radius: 4px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    border-bottom: 1px dashed #27272a;
    padding-bottom: 4px;
}

.message-sender {
    font-weight: 600;
    color: #a1a1aa;
}

.message-date {
    color: #52525b;
}

.message-body {
    font-size: 0.8rem;
    color: #d4d4d8;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}
