/**
 * ========================================
 * LANDING PAGE STYLES
 * PowerPoint Online–inspired start screen
 * ========================================
 */

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.landing-page {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f3f2f1;
    color: #323130;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Header ────────────────────────────────────────── */
.landing-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.brand h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.brand-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

/* ── Hero Section ──────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    padding: 40px 32px 56px;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-section h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-section p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-bottom: 28px;
}

/* ── Action Buttons ────────────────────────────────── */
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.action-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 24px 28px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
    flex: 1;
    max-width: 280px;
    text-align: left;
}

.action-card:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.action-card .card-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.action-card .card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.action-card .card-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
}

/* ── Main Content ──────────────────────────────────── */
.landing-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 32px 64px;
}

/* ── Section Headers ───────────────────────────────── */
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .count-badge {
    background: #e1dfdd;
    color: #605e5c;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ── Presentation Grid ─────────────────────────────── */
.presentations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.pres-card {
    background: #ffffff;
    border: 1px solid #e1dfdd;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.pres-card:hover {
    border-color: #c8c6c4;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.pres-card-thumb {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #e8e6e4 0%, #d2d0ce 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #a19f9d;
    position: relative;
    overflow: hidden;
}

.pres-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pres-card-body {
    padding: 14px 16px;
}

.pres-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pres-card-meta {
    font-size: 12px;
    color: #a19f9d;
}

.pres-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
}

.pres-card:hover .pres-card-actions {
    display: flex;
    gap: 4px;
}

.pres-card-actions button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.9);
    color: #605e5c;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    transition: background 0.15s;
}

.pres-card-actions button:hover {
    background: #ffffff;
    color: #d13438;
}

/* ── Empty State ───────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 64px 32px;
    color: #a19f9d;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    font-size: 18px;
    color: #605e5c;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Toast Notification ────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #323130;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: toast-in 0.3s ease;
    max-width: 360px;
}

.toast.toast-error {
    background: #d13438;
}

.toast.toast-success {
    background: #107c10;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── File Input (hidden) ───────────────────────────── */
#json-file-input { display: none; }

/* ── Confirm Dialog ────────────────────────────────── */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fade-in 0.15s ease;
}

.confirm-dialog {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.confirm-dialog h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.confirm-dialog p {
    font-size: 13px;
    color: #605e5c;
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.confirm-actions button {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #d2d0ce;
    background: #ffffff;
    color: #323130;
    transition: background 0.15s;
}

.confirm-actions button:hover {
    background: #f3f2f1;
}

.confirm-actions .btn-danger {
    background: #d13438;
    color: #ffffff;
    border-color: #d13438;
}

.confirm-actions .btn-danger:hover {
    background: #b52e31;
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 768px) {
    .header-inner { padding: 16px 20px; }
    .hero-section { padding: 28px 20px 40px; }
    .hero-section h2 { font-size: 22px; }
    .hero-actions { flex-direction: column; }
    .action-card { max-width: 100%; }
    .landing-main { padding: 24px 20px 48px; }
    .presentations-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
