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

:root {
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #3182ce;
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --danger-color: #e53e3e;
    --light-gray: #f7fafc;
    --border-color: #e2e8f0;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --border-radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: #ffffff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Navigation */
.navbar {
    background: var(--primary-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
    color: #90cdf4;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

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

.btn-secondary {
    background: var(--light-gray);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

/* Page Header */
.page-header {
    background: var(--light-gray);
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Sections */
section {
    padding: 3rem 0;
}

section:nth-child(even) {
    background: var(--light-gray);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

table caption {
    padding: 1rem;
    font-weight: 600;
    text-align: left;
    background: var(--light-gray);
    border-bottom: 1px solid var(--border-color);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background: rgba(49, 130, 206, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

/* Status indicators */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status.active,
.status-indicator.online,
.feature-status.available {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success-color);
}

.status.maintenance,
.status-indicator.maintenance {
    background: rgba(214, 158, 46, 0.1);
    color: var(--warning-color);
}

.priority-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.high {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger-color);
}

.priority-badge.medium {
    background: rgba(214, 158, 46, 0.1);
    color: var(--warning-color);
}

.priority-badge.low {
    background: rgba(113, 128, 150, 0.1);
    color: var(--text-secondary);
}

.speed-indicator,
.rating {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.speed-indicator.fast,
.rating.excellent {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success-color);
}

.speed-indicator.medium,
.rating.good {
    background: rgba(214, 158, 46, 0.1);
    color: var(--warning-color);
}

.speed-indicator.slow,
.rating.poor {
    background: rgba(229, 62, 62, 0.1);
    color: var(--danger-color);
}

.uptime.high {
    color: var(--success-color);
    font-weight: 600;
}

.uptime.medium {
    color: var(--warning-color);
    font-weight: 600;
}

.cost.free {
    color: var(--success-color);
    font-weight: 600;
}

.cost.paid {
    color: var(--danger-color);
    font-weight: 600;
}

.recommended.yes {
    color: var(--success-color);
    font-weight: 600;
}

.recommended.no {
    color: var(--danger-color);
    font-weight: 600;
}

.recommended.partial {
    color: var(--warning-color);
    font-weight: 600;
}

/* Login Section */
.login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

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

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-label input {
    width: auto !important;
}

.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.form-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.875rem;
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* Current Address */
.current-box {
    background: linear-gradient(135deg, var(--success-color), #48bb78);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.current-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.link-text {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

/* Alert Info */
.alert-info {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.notification-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.option {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.option:hover {
    border-color: var(--accent-color);
    background: rgba(49, 130, 206, 0.05);
}

/* Security Tips */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tip-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--accent-color);
}

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

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    margin-top: 3rem;
}

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

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

/* Error Page */
.error-section {
    text-align: center;
    padding: 5rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.suggestions {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    text-align: left;
}

.suggestions ul {
    list-style: none;
    margin-top: 1rem;
}

.suggestions li {
    margin-bottom: 0.5rem;
}

.suggestions a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .login-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .current-link {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
    
    .error-code {
        font-size: 4rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-section,
    section {
        padding: 2rem 0;
    }
    
    .info-card,
    .login-form,
    .alert-info {
        padding: 1.5rem;
    }
    
    .current-box {
        padding: 1.5rem;
    }
    
    .link-text {
        font-size: 1.25rem;
    }
    
    th, td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .cta-buttons,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    table {
        page-break-inside: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
}