:root {
    --bg-dark: #0f172a;
    --accent: #f97316; /* Orange button from mockup */
    --text-light: #f8fafc;
    --card-bg: #1e293b;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 50px;
}

nav {
    padding: 20px 0;
    border-bottom: 1px solid #334155;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: bold;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 30px; }
nav ul li a { color: white; text-decoration: none; font-size: 0.9rem; }
nav ul li a.portal-nav-link { color: var(--accent); }
nav ul li a.portal-nav-link:hover { color: #fdba74; }

/* Hero Section */
.hero {
    padding: 100px 0;
    background-image: url('images/MainBanner1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
    position: relative;
    z-index: 1;
}

h1 { font-size: 3rem; line-height: 1.1; margin-bottom: 20px; }
h1 span { color: #94a3b8; }

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
}

.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

.icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    height: auto;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Services */
.services { padding: 20px 0 80px 0; background: #0b1120; }
.section-title { text-align: center; margin-bottom: 50px; font-size: 2rem; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.card-icon {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}

.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-10px); }
.card h3 { color: var(--accent); margin-bottom: 15px; }

/* Footer Section */
.footer-section {
    padding: 20px 0;
    background: #0b1120;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.footer-content h2 {
    font-size: 1.8rem;2
    margin-bottom: 20px;
    color: var(--text-light);
}

.footer-content p {
    margin-bottom: 20px;
    color: #cbd5e1;
}

.tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tools-list li {
    padding: 8px 0;
    color: #cbd5e1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .logo {
        width: 100%;
        font-size: 3rem;
        max-width: 400px !important;
    }

    nav ul {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding: 0;
        margin: 0;
    }

    nav ul li {
        margin-left: 0;
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 10px 0;
        font-size: 1.8rem;
    }

    h1 {
        font-size: 2rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-image {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 400px;
    }

    .icon-overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 90%;
        height: auto;
        z-index: 10;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

/* ── Tools Link ── */
.tool-link {
    color: #cbd5e1;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s, text-decoration 0.2s;
    position: relative;
}

.tool-link::after {
    content: " →";
    opacity: 0;
    transition: opacity 0.2s;
}

.tool-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.tool-link:hover::after {
    opacity: 1;
}

/* ── Bluetooth Modal ── */
.bluetooth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    visibility: hidden;
    pointer-events: none;
}

.bluetooth-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: visible;
    pointer-events: auto;
}

.bluetooth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.bluetooth-modal-content {
    position: relative;
    z-index: 10000;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.bluetooth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #334155;
    flex-shrink: 0;
}

.bluetooth-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-light);
}

.bluetooth-close-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: auto;
    transition: color 0.2s;
}

.bluetooth-close-btn:hover {
    color: var(--accent);
}

.bluetooth-modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.bluetooth-container {
    width: 100%;
}

.bluetooth-card {
    width: 100%;
}

.bluetooth-card h1 {
    font-size: 1.4rem;
    text-align: center;
    margin: 0 0 0.25rem 0;
    color: var(--text-light);
}

.bluetooth-subtitle {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0 0 1.5rem 0;
}

/* ── Bluetooth Buttons ── */
#btn-connect,
#btn-send,
#btn-disconnect,
#btn-refresh {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    margin-top: 0.75rem;
}

#btn-connect:first-of-type {
    margin-top: 0;
}

#btn-connect {
    background: var(--accent);
    color: white;
}

#btn-connect:hover:not(:disabled) {
    opacity: 0.85;
}

#btn-send {
    background: #22c55e;
    color: white;
}

#btn-send:hover:not(:disabled) {
    background: #16a34a;
}

#btn-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#btn-disconnect {
    background: transparent;
    border: 1px solid #94a3b8;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 0.55rem;
    margin-top: 0.5rem;
}

#btn-disconnect:hover:not(:disabled) {
    border-color: #ef4444;
    color: #ef4444;
}

#btn-refresh {
    width: auto;
    padding: 0.3rem 0.6rem;
    font-size: 1.1rem;
    background: transparent;
    border: 1px solid #94a3b8;
    color: #94a3b8;
    border-radius: 8px;
    margin-top: 0;
    margin-left: 0.5rem;
}

#btn-refresh:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Bluetooth Form ── */
#wifi-form {
    display: none;
    margin-top: 1.25rem;
}

#wifi-form.visible {
    display: block;
}

.bluetooth-field {
    margin-bottom: 0.75rem;
}

.bluetooth-field label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.3rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #334155;
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

input:focus {
    border-color: var(--accent);
}

/* ── Saved Networks ── */
#saved-networks {
    display: none;
    margin-top: 1.25rem;
}

#saved-networks.visible {
    display: block;
}

.bluetooth-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.bluetooth-section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
}

.network-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    background: var(--bg-dark);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.network-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.network-name {
    font-size: 0.9rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.network-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    white-space: nowrap;
}

.btn-delete {
    width: auto !important;
    padding: 0.3rem 0.65rem !important;
    font-size: 0.75rem;
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-top: 0 !important;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
}

.no-networks {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 0.75rem;
}

/* ── Status Display ── */
#status {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 1rem;
    padding: 0.6rem;
    border-radius: 8px;
    background: transparent;
    transition: background 0.3s, color 0.3s;
}

#status.info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

#status.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

#status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

#status:empty {
    display: none;
}

/* ── Spinner ── */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.4rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* About Founder Section Styles */
.about-founder {
    padding: 20px 0;
    background-color: #0b0e14; /* Matching your dark theme */
    color: #ffffff;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    overflow: hidden;
    border-radius: 20px;
    max-height: 400px;
}

.profile-pic {
    width: 200%;
    margin-left: -100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 1px solid #333;
}

.youtube-shoutout {
    margin-top: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid #ff6600; /* Matching the orange from your VervetGuard button */
    border-radius: 8px;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #ff6600;
    color: #ff6600;
    margin-top: 15px;
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: #ff6600;
    color: #fff;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .profile-pic {
        width: 100%;
        margin-left: 0;
    }
    .youtube-shoutout {
        border-left: none;
        border-top: 4px solid #ff6600;
    }
}