/* ==========================================================================
   GalaxyCam — Modern Surveillance SaaS Stylesheet
   Full integration with AioGalaxy CSS Variables & Dark Theme Standards
   ========================================================================== */

:root {
    --cam-bg: #090d16;
    --cam-surface: #0f172a;
    --cam-surface-card: #131d34;
    --cam-surface-hover: #1e293b;
    --cam-border: rgba(148, 163, 184, 0.12);
    --cam-border-active: rgba(59, 130, 246, 0.4);
    --cam-primary: #3b82f6;
    --cam-primary-hover: #2563eb;
    --cam-success: #10b981;
    --cam-danger: #ef4444;
    --cam-warning: #f59e0b;
    --cam-text-main: #f8fafc;
    --cam-text-muted: #94a3b8;
    --cam-text-dim: #64748b;
    --cam-radius-sm: 8px;
    --cam-radius-md: 14px;
    --cam-radius-lg: 20px;
    --cam-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
    --cam-shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --cam-shadow-glow: 0 0 20px rgba(59, 130, 246, 0.25);
}

/* Container */
.cam-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* Base Cards */
.cam-card {
    background: var(--cam-surface-card);
    border: 1px solid var(--cam-border);
    border-radius: var(--cam-radius-md);
    padding: 24px;
    box-shadow: var(--cam-shadow-sm);
    transition: all 0.2s ease;
}
.cam-card:hover {
    border-color: var(--cam-border-active);
}

/* Metric / KPI Cards */
.cam-kpi-card {
    background: linear-gradient(145deg, var(--cam-surface-card) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid var(--cam-border);
    border-radius: var(--cam-radius-md);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
}
.cam-kpi-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 90px; height: 90px;
    background: radial-gradient(circle, var(--kpi-glow, rgba(59,130,246,0.15)) 0%, transparent 70%);
    pointer-events: none;
}
.cam-kpi-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.cam-kpi-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--cam-text-main);
    line-height: 1.1;
    margin: 4px 0 2px 0;
}
.cam-kpi-lbl {
    font-size: 13px;
    color: var(--cam-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Grids */
.cam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}
.cam-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

/* Buttons */
.cam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--cam-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-decoration: none !important;
    transition: all 0.15s ease;
    line-height: 1.4;
}
.cam-btn-primary {
    background: var(--cam-primary);
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}
.cam-btn-primary:hover {
    background: var(--cam-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}
.cam-btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cam-border);
    color: var(--cam-text-main) !important;
}
.cam-btn-outline:hover {
    background: var(--cam-surface-hover);
    border-color: rgba(255, 255, 255, 0.2);
}
.cam-btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171 !important;
}
.cam-btn-danger:hover {
    background: var(--cam-danger);
    color: #fff !important;
}
.cam-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
}

/* Badges */
.cam-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.cam-badge-online { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.cam-badge-offline { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.cam-badge-pro { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.cam-badge-free { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }

/* Blinking live recording dot */
.cam-rec-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: camPulse 1.4s infinite;
    display: inline-block;
}
@keyframes camPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.85); }
}

/* Live Video Player Box */
.cam-player-box {
    position: relative;
    background: #000;
    border-radius: var(--cam-radius-md);
    overflow: hidden;
    border: 1px solid var(--cam-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.cam-player-box.theater-mode {
    max-height: 85vh !important;
    aspect-ratio: auto !important;
    height: 75vh;
}
.cam-player-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease-out;
}
.cam-player-overlay {
    position: absolute;
    top: 14px; left: 14px; right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 5;
}
.cam-player-overlay > * {
    pointer-events: auto;
}

/* Zoom Toolbar */
.cam-zoom-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 4px;
}
.cam-zoom-btn {
    background: transparent;
    border: none;
    color: var(--cam-text-main);
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}
.cam-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Push to Talk Intercom Button */
.cam-ptt-btn {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: var(--cam-primary);
    border: 3px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.cam-ptt-btn:hover {
    transform: scale(1.05);
}
.cam-ptt-btn.active {
    background: var(--cam-danger);
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.7);
    animation: pttPulse 0.8s infinite alternate;
}
@keyframes pttPulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* Professional Tables */
.cam-table-wrapper {
    overflow-x: auto;
    border-radius: var(--cam-radius-sm);
}
.cam-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}
.cam-table th {
    background: rgba(15, 23, 42, 0.6);
    padding: 12px 14px;
    font-weight: 700;
    color: var(--cam-text-muted);
    border-bottom: 1px solid var(--cam-border);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}
.cam-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--cam-text-main);
    vertical-align: middle;
}
.cam-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Confirmation Modal */
.cam-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.cam-modal-backdrop.show {
    display: flex;
}
.cam-modal-dialog {
    background: var(--cam-surface-card);
    border: 1px solid var(--cam-border);
    border-radius: var(--cam-radius-md);
    max-width: 440px;
    width: 100%;
    padding: 24px;
    box-shadow: var(--cam-shadow-md);
    text-align: center;
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Landing Page Marketing Components */
.cam-hero {
    text-align: center;
    padding: 70px 16px 50px 16px;
    position: relative;
}
.cam-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    border-radius: 9999px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
}
.cam-hero h1 {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.15;
    font-weight: 900;
    color: var(--cam-text-main);
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
}
.cam-hero p {
    font-size: clamp(16px, 2.5vw, 19px);
    color: var(--cam-text-muted);
    max-width: 680px;
    margin: 0 auto 34px auto;
    line-height: 1.6;
}

/* Comparison Table */
.cam-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--cam-surface-card);
    border-radius: var(--cam-radius-md);
    overflow: hidden;
    border: 1px solid var(--cam-border);
}
.cam-comparison-table th, .cam-comparison-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--cam-border);
}
.cam-comparison-table th {
    background: rgba(15, 23, 42, 0.8);
    font-size: 15px;
    font-weight: 700;
}
.cam-comparison-table tr:last-child td {
    border-bottom: none;
}

/* FAQ Accordion */
.cam-faq-item {
    background: var(--cam-surface-card);
    border: 1px solid var(--cam-border);
    border-radius: var(--cam-radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.cam-faq-item:hover {
    border-color: var(--cam-border-active);
}
.cam-faq-question {
    padding: 18px 20px;
    font-weight: 700;
    font-size: 16px;
    color: var(--cam-text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.cam-faq-answer {
    padding: 0 20px 18px 20px;
    color: var(--cam-text-muted);
    font-size: 14px;
    line-height: 1.65;
    display: none;
}
.cam-faq-item.active .cam-faq-answer {
    display: block;
}
.cam-faq-item.active .cam-faq-icon {
    transform: rotate(180deg);
}
.cam-faq-icon {
    transition: transform 0.2s ease;
    color: var(--cam-primary);
}
