* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: #0c0e14;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

.app-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #121620;
    border-right: 1px solid #1e2638;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
}

.brand-tag {
    font-size: 10px;
    background: #0284c7;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    color: #94a3b8;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active, .nav-item:focus {
    background: #1e2638;
    color: #38bdf8;
    outline: none;
}

.user-footer {
    padding-top: 16px;
    border-top: 1px solid #1e2638;
}

.profile-pill {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-pill .avatar {
    width: 34px;
    height: 34px;
    background: #0284c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Hero */
.hero-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    border: 1px solid #312e81;
    padding: 48px;
    margin-bottom: 40px;
}

.hero-chip {
    font-size: 11px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 1px;
    background: rgba(56, 189, 248, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    margin: 16px 0 12px;
    color: #ffffff;
}

.hero-desc {
    max-width: 600px;
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.hero-actions {
    display: flex;
    gap: 14px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn:focus {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.btn-primary {
    background: #0284c7;
    color: white;
}
.btn-primary:hover {
    background: #0369a1;
}

.btn-secondary {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
}
.btn-secondary:hover {
    background: #334155;
}

/* Cards Grid */
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #f8fafc;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: #141923;
    border: 1px solid #1e2638;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover, .card:focus {
    transform: translateY(-4px);
    border-color: #38bdf8;
    outline: none;
}

.card-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.card-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 12px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #38bdf8;
    font-weight: 600;
}

/* PIN Screen */
.pin-card, .sources-card {
    max-width: 500px;
    margin: 40px auto;
    background: #141923;
    border: 1px solid #1e2638;
    border-radius: 16px;
    padding: 36px;
    text-align: center;
}

.pin-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.pin-header p {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 28px;
}

.pin-input {
    width: 100%;
    padding: 16px;
    font-size: 28px;
    letter-spacing: 8px;
    text-align: center;
    background: #0c0e14;
    border: 2px solid #1e2638;
    border-radius: 10px;
    color: #38bdf8;
    font-weight: bold;
    margin-bottom: 20px;
}

.pin-input:focus {
    border-color: #38bdf8;
    outline: none;
}

.btn-block {
    width: 100%;
}

.pin-alert {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.pin-alert.success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid #10b981;
}

.pin-alert.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid #ef4444;
}

.hidden { display: none !important; }

/* Video Player Modal */
.player-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.player-container {
    width: 90%;
    max-width: 1080px;
    position: relative;
}

.player-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: transparent;
    border: none;
    font-size: 36px;
    color: white;
    cursor: pointer;
}

video {
    width: 100%;
    border-radius: 12px;
    background: black;
    max-height: 80vh;
}
