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

:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --text-color: #e0e0e0;
    --link-color: #4a90e2;
    --link-hover: #6bb6ff;
    --border-color: #2a2a3e;
    --max-width: 1200px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-color);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(15, 52, 96, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(15, 52, 96, 0.15) 0%, transparent 50%);
    min-height: 100vh;
}

/* Header */
header {
    background-color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

nav a:hover,
nav a.active {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

/* Main Content */
main {
    max-width: var(--max-width);
    margin: 3rem auto;
    padding: 0 2rem;
}

.content-section {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--link-hover);
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
    color: var(--link-color);
}

h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-color);
}

h4 {
    font-size: 1.25rem;
    margin: 1.25rem 0 0.75rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1.25rem;
    text-align: justify;
}

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

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1.25rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.screenshot {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.centered-image {
    display: block;
    margin: 2rem auto;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background-color: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.feature-card h3 {
    color: var(--link-hover);
    margin-top: 0;
}

/* Warning Box */
.warning-box {
    background-color: rgba(255, 152, 0, 0.1);
    border-left: 4px solid #ff9800;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.warning-box h3 {
    color: #ff9800;
    margin-top: 0;
}

/* Info Box */
.info-box {
    background-color: rgba(74, 144, 226, 0.1);
    border-left: 4px solid var(--link-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.info-box h3 {
    color: var(--link-color);
    margin-top: 0;
}

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

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--link-hover);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .hamburger {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--secondary-color);
        border-right: 2px solid var(--border-color);
        transition: left 0.3s ease;
        padding: 5rem 0 2rem 0;
        z-index: 999;
        overflow-y: auto;
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    nav li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    nav a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: none;
    }

    nav a:hover,
    nav a.active {
        background-color: var(--accent-color);
        border-bottom: none;
    }

    /* Overlay */
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 998;
    }

    .overlay.active {
        opacity: 1;
        visibility: visible;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .logo {
        width: 40px;
        height: 40px;
    }

    .content-section {
        padding: 1.5rem;
    }

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

    main {
        padding: 0 1rem;
        margin: 2rem auto;
    }

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

    p {
        text-align: left;
    }

    /* Mobile adaptations for access portal */
    .access-portal {
        padding: 1rem;
    }

    .portal-title {
        font-size: 1.1rem;
    }

    .link-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .portal-link-input {
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem;
    }

    .copy-btn {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1rem;
    }

    .portal-description {
        font-size: 0.9rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .info-box,
    .warning-box {
        padding: 1rem;
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 0.75rem;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .logo {
        width: 35px;
        height: 35px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .content-section {
        padding: 1rem;
    }

    main {
        margin: 1.5rem auto;
    }

    /* Extra small screen adaptations */
    .access-portal {
        padding: 0.85rem;
    }

    .portal-title {
        font-size: 1rem;
    }

    .portal-link-input {
        font-size: 0.8rem;
        padding: 0.6rem 0.75rem;
    }

    .copy-btn {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .portal-description {
        font-size: 0.85rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .info-box h3,
    .warning-box h3 {
        font-size: 1rem;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--link-color);
    color: white;
    padding: 20px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Access Portal Styles */
.access-portal {
    background-color: rgba(15, 52, 96, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.access-portal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.portal-title {
    color: var(--link-color);
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.portal-status {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4caf50;
    margin: 0.75rem 0;
    padding: 0.25rem 0.75rem;
    background-color: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
}

.portal-description {
    color: #b0b0b0;
    font-size: 0.95rem;
    margin: 0.75rem 0 0 0;
    line-height: 1.5;
}

/* Link Container with Copy Button */
.link-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    margin: 1rem 0;
}

.portal-link-input {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.portal-link-input:focus {
    outline: none;
    border-color: var(--link-color);
    background-color: rgba(0, 0, 0, 0.4);
}

/* Copy Button */
.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: var(--link-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.3s ease, transform 0.1s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background-color: var(--link-hover);
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background-color: #4caf50;
}

.copy-btn svg {
    flex-shrink: 0;
}

/* Section Styles */
.section {
    margin: 2rem 0;
}

.section h2 {
    margin-bottom: 1rem;
}
