/* CSS Variables for theming */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --secondary-text: #666666;
    --border-color: #e0e0e0;
    --section-bg: #f8f8f8;
    --accent-color: #007aff;
    --checkbox-checked: #34c759;
    --checkbox-border: #c7c7cc;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --text-color: #ffffff;
        --secondary-text: #a0a0a0;
        --border-color: #2c2c2e;
        --section-bg: #1c1c1e;
        --accent-color: #0a84ff;
        --checkbox-checked: #30d158;
        --checkbox-border: #48484a;
    }
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
header {
    text-align: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
}

.lang-toggle {
    position: absolute;
    top: 0rem;
    right: 0;
    background-color: var(--section-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.75rem;
    line-height: 1;
    color: var(--text-color);
    transition: background-color 0.2s ease;
}

.lang-toggle:hover {
    background-color: var(--section-bg);
    box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.03);
}

.lang-toggle:active {
    box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
    .lang-toggle:hover {
        box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.05);
    }

    .lang-toggle:active {
        box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.1);
    }
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--secondary-text);
    font-size: 1rem;
}

/* Main content */
main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-section {
    background-color: var(--section-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Collapsible section header */
.section-header {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-color);
    text-align: left;
    transition: background-color 0.2s ease;
}

.section-header:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

@media (prefers-color-scheme: dark) {
    .section-header:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* Toggle icon (chevron) */
.toggle-icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
    margin-left: 1rem;
}

.toggle-icon::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-color);
    border-bottom: 2px solid var(--text-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%) rotate(45deg);
    transition: transform 0.3s ease;
}

.section-header[aria-expanded="false"] .toggle-icon::before {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Content area */
.info-content {
    padding: 0 1.5rem 1.5rem;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.collapsible .info-content {
    padding-top: 1rem;
}

.section-header[aria-expanded="false"] + .info-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.info-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.info-content h3:first-child {
    margin-top: 0;
}

.info-content p {
    margin-bottom: 0.75rem;
}

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

.info-content strong {
    font-weight: 600;
}

.info-content ul {
    list-style: none;
    padding-left: 0;
}

.info-content ul li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
}

.info-content ul li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--accent-color);
}

/* WiFi QR Code */
.wifi-qr {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.wifi-qr img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    background-color: #ffffff;
    padding: 0.5rem;
}

/* WiFi Button */
.wifi-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: opacity 0.2s ease;
}

.wifi-button:hover {
    opacity: 0.8;
}

.wifi-button:active {
    opacity: 0.6;
}

.wifi-button.copied {
    background-color: var(--checkbox-checked);
}

/* Checklist styles */
.checklist {
    list-style: none;
    padding-left: 0;
    margin-top: 0;
}

.info-content .checklist li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.info-content .checklist li:last-child {
    border-bottom: none;
}

.info-content .checklist li::before {
    content: none;
}

.checklist input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--checkbox-checked);
    border: 2px solid var(--checkbox-border);
    border-radius: 4px;
    flex-shrink: 0;
}

.checklist label {
    cursor: pointer;
    user-select: none;
    flex-grow: 1;
}

.checklist input[type="checkbox"]:checked + label {
    text-decoration: line-through;
    color: var(--secondary-text);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text);
}

/* Responsive adjustments for larger screens */
@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }

    header {
        padding: 3rem 0;
    }

    header h1 {
        font-size: 2.5rem;
    }
}
