/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #e0e0e0;
    background-color: #0a0a0a;
    font-size: 16px;
}

/* Header and Navigation */
header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #4ade80;
}

.logo img {
    height: 50px;
    width: auto;
}

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

nav a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s;
}

nav a:hover {
    color: #4ade80;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: #4ade80;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 2rem;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    color: #4ade80;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    color: #4ade80;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    color: #5eead4;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

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

.intro-text {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

.intro, .features, .darknet-overview, .history, .cta {
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

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

.feature-card {
    background-color: #0f0f0f;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
}

.feature-card h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

/* Guide Content */
.guide-content, .security-content, .about-content {
    background-color: #1a1a1a;
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
}

.guide-section, .security-section, .about-section {
    margin-bottom: 3rem;
}

.registration-steps h3 {
    color: #5eead4;
    margin-top: 1.5rem;
}

.security-image {
    margin: 2rem 0;
    text-align: center;
}

.security-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
}

.caption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #808080;
    font-style: italic;
}

/* About Page Specific */
.hero-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-logo img {
    max-width: 400px;
    height: auto;
}

/* Call to Action */
.cta {
    text-align: center;
    padding: 3rem;
}

.cta h2 {
    margin-top: 0;
}

.cta-button {
    display: inline-block;
    background-color: #4ade80;
    color: #0a0a0a;
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: background-color 0.2s;
}

.cta-button:hover {
    background-color: #22c55e;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    border-top: 1px solid #2a2a2a;
    padding: 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: #808080;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.9rem;
    color: #606060;
    margin-top: 1rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .guide-content, .security-content, .about-content {
        padding: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
a:focus, button:focus {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    header, footer {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
}

/* Ensure the parent container allows its children to size correctly */
.access-portal {
    /* If it's a flex container, ensure it allows children to take full width */
    display: block; /* Or flex, but ensure width: 100% is effective */
    width: 100%; /* Ensure the container itself takes full available width */
    max-width: 100%; /* Prevent it from expanding beyond its parent */
    overflow: hidden; /* Important: Prevents children from breaking out of this container */
    padding: 1rem 0; /* Example padding, adjust as needed */
}

.portal-link-input {
    display: block; /* Make it a block-level element */
    width: 100%; /* Crucial: Make the input take 100% of its parent's width */
    box-sizing: border-box; /* Include padding and border in the element's total width */
    padding: 10px; /* Adjust padding as needed for visual comfort */
    border: 1px solid var(--border-color); /* Use your defined border color */
    border-radius: 5px; /* Slightly rounded corners for aesthetics */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Inherit font for consistency */
    font-size: 30px; /* Consistent font size */
    color: var(--text-dark); /* Consistent text color */
    background-color: var(--light-bg); /* Consistent background */

    /* These are key for handling long text without breaking layout */
    white-space: nowrap; /* Keep text on a single line */
    overflow-x: auto; /* Add horizontal scrollbar if content overflows */
    -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS devices */
    min-width: 0; /* Allows the input to shrink if necessary within flex/grid contexts */
}

/* Optional: Adjust other elements to ensure they don't push the layout */
.portal-title,
.portal-status,
p {
    max-width: 100%; /* Ensure these elements don't cause horizontal overflow */
    word-break: break-word; /* Break long words if necessary */
    margin-bottom: 0.5rem; /* Add some spacing */
}
