/* CSS Reset & Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --danger-color: #dc2626;
    --danger-hover: #b91c1c;
    --secondary-color: #4b5563;
    --secondary-hover: #374151;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --card-alt-bg: #334155;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --success-color: #22c55e;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a:hover {
    color: #60a5fa;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Header & Navbar */
.navbar {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-color);
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 70%);
}

.hero-title {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #fff;
}

.btn-secondary {
    background-color: var(--card-alt-bg);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: #fff;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Grid & Cards */
.section {
    padding: 4rem 0;
}

.section-alt {
    background-color: #111827;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.75rem;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Legal & Document Pages */
.page-content {
    padding: 3rem 1.5rem;
    flex: 1;
}

.page-content h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.updated-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.doc-section {
    margin-bottom: 2rem;
}

.doc-section h2 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.doc-section p, .doc-section ul {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.doc-section ul {
    padding-left: 1.5rem;
}

/* Call Interface Page */
.call-container {
    padding: 2rem 1.5rem;
    flex: 1;
    display: flex;
    justify-content: center;
}

.call-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.call-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.status-badge {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
}

.status-offline {
    background-color: #374151;
    color: #9ca3af;
}

.status-idle {
    background-color: #065f46;
    color: #a7f3d0;
}

.status-online {
    background-color: #1e40af;
    color: #bfdbfe;
}

.peer-id-label {
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-muted);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    background-color: #020617;
    border-radius: 0.75rem;
    padding: 1rem;
    min-height: 240px;
}

.video-wrapper {
    position: relative;
    background-color: #0f172a;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 10;
}

.dialer-section {
    display: flex;
    gap: 0.5rem;
}

.input-group {
    display: flex;
    width: 100%;
    gap: 0.5rem;
}

.dial-input {
    flex: 1;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.dial-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.controls-section {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.log-section h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.log-box {
    background-color: #020617;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    height: 120px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background-color: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

/* Language Switcher */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    text-decoration: none;
}

.lang-switch:hover {
    background-color: var(--card-alt-bg);
    border-color: var(--primary-color);
    color: #fff;
}

/* FAQ & Accordion Styles */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item:hover {
    border-color: #64748b;
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    list-style: none;
    color: var(--text-color);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.25s ease;
}

details[open] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
    border-top: 1px solid rgba(71, 85, 105, 0.4);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.faq-answer p {
    margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ol, .faq-answer ul {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.faq-answer li {
    margin-bottom: 0.35rem;
}

/* Callout & Info Boxes */
.info-box {
    background-color: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.25rem;
    border-radius: 0 0.5rem 0.5rem 0;
    margin: 1.25rem 0;
    color: var(--text-color);
}

.info-box p {
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.alert-warning {
    background-color: rgba(234, 179, 8, 0.1);
    border-left: 4px solid #eab308;
}

.alert-warning p {
    color: #fef08a;
}

/* Step list */
.step-list {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
    margin: 1rem 0;
}

.step-list li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 2.75rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Contact & Support Form */
.contact-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-label .required {
    color: var(--danger-color);
    margin-left: 0.25rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Category Quick Links */
.support-cats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.support-cat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
    color: var(--text-color);
    display: block;
}

.support-cat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    color: #fff;
}

.support-cat-card .cat-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.support-cat-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.support-cat-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

    .hero-buttons {
        flex-direction: column;
    }

    .input-group {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .nav-links {
        gap: 0.85rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .navbar-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

