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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #006A43 0%, #004a2f 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 30px;
}

/* Input Section */
.input-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.4rem;
}

.sample-btn {
    background: #006A43;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sample-btn:hover {
    background: #005536;
    transform: translateY(-1px);
}

#headerInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
    min-height: 300px;
    transition: border-color 0.3s ease;
}

#headerInput:focus {
    outline: none;
    border-color: #006A43;
    box-shadow: 0 0 0 3px rgba(0, 106, 67, 0.1);
}

.input-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.analyze-btn, .clear-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analyze-btn {
    background: #006A43;
    color: white;
}

.analyze-btn:hover {
    background: #005536;
    transform: translateY(-1px);
}

.clear-btn {
    background: #006A43;
    color: white;
}

.clear-btn:hover {
    background: #005536;
    transform: translateY(-1px);
}

/* Results Section */
.results-section {
    display: grid;
    gap: 25px;
}

.results-section > h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 10px;
}

.result-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #006A43;
}

.result-card h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-card h3 i {
    color: #006A43;
}

/* Info Grid */
.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    align-items: start;
}

.info-label {
    font-weight: 600;
    color: #495057;
}

.info-value {
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

/* Authentication Grid */
.auth-grid {
    display: grid;
    gap: 15px;
}

.auth-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-label {
    font-weight: 600;
    font-size: 1.1rem;
}

.auth-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.auth-pass {
    background: #d4edda;
    color: #155724;
}

.auth-fail {
    background: #f8d7da;
    color: #721c24;
}

.auth-neutral {
    background: #fff3cd;
    color: #856404;
}

.auth-interpretation {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    width: 100%;
}

/* Hop List */
.hop-list {
    display: grid;
    gap: 15px;
}

.hop-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    position: relative;
}

.hop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.hop-number {
    background: #28a745;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.hop-timestamp {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-size: 0.9rem;
}

.hop-server {
    font-weight: 600;
    margin-bottom: 5px;
}

.hop-ip {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-size: 0.9rem;
}

.hop-delay {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    display: inline-block;
}

.hop-delay.warning {
    background: #f8d7da;
    color: #721c24;
}

/* Security Analysis */
.security-list {
    display: grid;
    gap: 15px;
}

.security-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.security-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.security-icon.info {
    color: #006A43;
}

.security-icon.warning {
    color: #ffc107;
}

.security-icon.danger {
    color: #dc3545;
}

.security-icon.success {
    color: #28a745;
}

.security-content {
    flex: 1;
}

.security-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.security-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Error Section */
.error-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.error-card {
    text-align: center;
    color: #721c24;
}

.error-card i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 15px;
}

.error-card h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.error-card p {
    font-size: 1rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    margin-top: 40px;
    text-align: center;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #006A43 0%, #004a2f 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cta-section h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.cta-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.9;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: #006A43;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cta-button:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.disclaimer {
    background: #e9ecef;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.disclaimer i {
    color: #28a745;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .info-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .auth-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hop-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .input-controls {
        flex-direction: column;
    }
    
    .analyze-btn, .clear-btn {
        justify-content: center;
    }
    
    .cta-section {
        padding: 30px 20px;
    }
    
    .cta-section h3 {
        font-size: 1.3rem;
    }
    
    .cta-section p {
        font-size: 1rem;
    }
    
    .disclaimer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .input-section, .result-card {
        padding: 20px 15px;
    }
    
    #headerInput {
        min-height: 250px;
    }
}

/* Animation for results appearing */
.results-section {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.analyze-btn.loading {
    position: relative;
    color: transparent;
}

.analyze-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
