:root {
    --bg: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --bg-nav: rgba(10, 10, 10, 0.95);
    --text: #e0e0e0;
    --text-muted: #888;
    --accent: #00d4aa;
    --accent-hover: #00b894;
    --border: #222;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    transition: all 0.3s;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 700;
}

.navbar-brand:hover {
    color: var(--text);
}

.logo-symbol {
    color: var(--accent);
    font-size: 1.3rem;
    font-weight: 800;
}

.logo-text span {
    color: var(--accent);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero */
.hero {
    padding: 140px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 212, 170, 0.05) 0%, transparent 100%);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
}

.hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Search */
.search-section {
    padding: 20px 0 40px;
}

.search-form {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-form input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-form input:focus {
    border-color: var(--accent);
}

.search-form input::placeholder {
    color: var(--text-muted);
}

/* Sections */
.section {
    padding: 40px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent);
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* CCTV Grid */
.cctv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.cctv-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
    color: var(--text);
}

.cctv-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    color: var(--text);
}

.cctv-card-preview {
    height: 120px;
    background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 2.5rem;
    color: var(--text-muted);
}

.cctv-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.cctv-card-body {
    padding: 16px;
}

.cctv-card-body h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cctv-card-link {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

.cctv-card-link i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.cctv-card:hover .cctv-card-link i {
    transform: translateX(4px);
}

/* Detail Page */
.detail-hero {
    padding: 120px 0 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.back-link:hover {
    color: var(--accent);
}

.detail-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-meta i {
    margin-right: 6px;
    color: var(--accent);
}

.stream-section {
    padding: 0 0 60px;
}

.stream-wrapper {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.stream-iframe {
    display: block;
}

.stream-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stream-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.stream-info-card i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.stream-info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.stream-info-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.btn-copy {
    margin-top: 12px;
    padding: 10px 20px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: var(--accent);
    color: #000;
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-logo:hover {
    color: var(--text);
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--accent);
    color: #000;
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--text-muted);
}

.footer-bottom a:hover {
    color: var(--accent);
}

/* Error */
.error-section h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 24px;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--bg-nav);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
        gap: 4px;
    }

    .navbar-links.show {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 12px 16px;
    }

    .hamburger {
        display: flex;
    }

    .cctv-grid {
        grid-template-columns: 1fr;
    }

    .stream-info {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .detail-hero h1 {
        font-size: 1.5rem;
    }
}
