/* 500kbps.com inspired design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #282a36;
    color: #f8f8f2;
    line-height: 1.6;
    min-height: 100vh;
    font-size: 13px;
    position: relative;
    overflow-x: hidden;
}

/* Default link styling for better visibility */
a {
    color: #8be9fd;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #50fa7b;
    text-shadow: 0 0 3px #50fa7b;
}


.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Main fieldset card */
.main-card {
    background: transparent;
    border: 1px solid #50fa7b;
    padding: 2rem;
    margin: 0;
    backdrop-filter: none;
    transition: all 0.3s ease;
}


/* Page title legend */
.page-title {
    font-size: 2rem;
    color: #50fa7b;
    text-shadow: 0 0 10px rgba(80, 250, 123, 0.3);
    padding: 0 1rem;
    margin-bottom: 0;
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.subtitle {
    color: #8be9fd;
    font-size: 1rem;
    text-align: left;
    margin-bottom: 0.5rem;
    animation: fadeIn 1.2s ease-in;
    opacity: 0.9;
}

.contact-info {
    color: #8be9fd;
    font-size: 0.85rem;
    text-align: left;
    margin-bottom: 1rem;
    animation: fadeIn 1.4s ease-in;
    opacity: 0.6;
}

.contact-info a {
    color: #50fa7b;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.contact-info a:hover {
    color: #50fa7b;
    text-shadow: 0 0 5px #50fa7b;
    border-bottom: 1px solid #50fa7b;
}

/* Scanner form */
.scanner-form {
    margin-bottom: 1rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    color: #bd93f9;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.url-input {
    width: 100%;
    background: rgba(68, 71, 90, 0.6);
    border: 1px solid #6272a4;
    padding: 0.75rem;
    color: #f8f8f2;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.url-input:focus {
    outline: none;
    border-color: #50fa7b;
    background: rgba(68, 71, 90, 0.8);
    box-shadow: 0 0 0 2px rgba(80, 250, 123, 0.2);
}

.scan-btn {
    background: linear-gradient(135deg, #50fa7b, #8be9fd);
    border: none;
    padding: 0.75rem 2rem;
    color: #282a36;
    font-family: inherit;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.scan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(80, 250, 123, 0.4);
}

.scan-btn:disabled {
    background: #6272a4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Section fieldsets */
.progress-section, .results-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #bd93f9;
    margin: 1rem 0;
    padding: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}


/* Section legends */
.section-legend {
    color: #bd93f9;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 0 1rem;
    text-shadow: 0 0 5px rgba(189, 147, 249, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.legend-text {
    display: inline-block;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #44475a;
    border-top: 2px solid #bd93f9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress log */
.progress-log {
    background: rgba(33, 34, 44, 0.8);
    border: 1px solid #44475a;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin-top: 1rem;
}

.log-entry {
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

.log-timestamp {
    color: #6272a4;
    margin-right: 0.5rem;
}

.log-message {
    color: #f8f8f2;
}

.log-info { color: #8be9fd; }
.log-success { color: #50fa7b; }
.log-warning { color: #ffb86c; }
.log-error { color: #ff5555; }

/* Progress collapsed state */
.progress-collapsed {
    text-align: center;
    margin: 0.5rem 0;
}

.show-log-btn {
    color: #8be9fd;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    opacity: 0.7;
}

.show-log-btn:hover {
    color: #50fa7b;
    opacity: 1;
}

/* Overall status */
.overall-status {
    text-align: center;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid;
    transition: all 0.3s ease;
}

.overall-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.overall-status:hover::before {
    left: 100%;
}

.overall-status.secure {
    color: #50fa7b;
    border-color: #50fa7b;
    text-shadow: 0 0 10px rgba(80, 250, 123, 0.5);
}

.overall-status.vulnerable {
    color: #ff5555;
    border-color: #ff5555;
    text-shadow: 0 0 10px rgba(255, 85, 85, 0.5);
}

.overall-status.warning {
    color: #ffb86c;
    border-color: #ffb86c;
    text-shadow: 0 0 10px rgba(255, 184, 108, 0.5);
}

/* Results content */
.results-content {
    display: grid;
    gap: 1rem;
}

.test-result {
    background: rgba(33, 34, 44, 0.8);
    border: 1px solid #44475a;
    padding: 1rem;
    border-left: 4px solid #6272a4;
    transition: all 0.3s ease;
}


.test-result.pass {
    border-left-color: #50fa7b;
}

.test-result.fail {
    border-left-color: #ff5555;
}

.test-result.warning {
    border-left-color: #ffb86c;
}

.test-title {
    color: #bd93f9;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.test-details {
    color: #f8f8f2;
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.test-details ul {
    margin: 0.5rem 0;
    padding-left: 1rem;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for findings list */
.test-details ul::-webkit-scrollbar {
    width: 4px;
}

.test-details ul::-webkit-scrollbar-track {
    background: rgba(68, 71, 90, 0.3);
    border-radius: 2px;
}

.test-details ul::-webkit-scrollbar-thumb {
    background: #50fa7b;
    border-radius: 2px;
}

.test-details ul::-webkit-scrollbar-thumb:hover {
    background: #8be9fd;
}

.test-details li {
    margin: 0.25rem 0;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(68, 71, 90, 0.2);
}

.test-details li:last-child {
    border-bottom: none;
}

.hidden {
    display: none !important;
}

/* Action buttons */
.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #44475a;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.action-btn.primary {
    background: linear-gradient(135deg, #50fa7b, #8be9fd);
    color: #282a36;
    border-color: #50fa7b;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(80, 250, 123, 0.4);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #bd93f9;
    border-color: #bd93f9;
}

.action-btn.secondary:hover {
    background: rgba(189, 147, 249, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(189, 147, 249, 0.2);
}

/* Log overlay modal */
.log-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.log-modal {
    background: rgba(40, 42, 54, 0.95);
    border: 1px solid #bd93f9;
    padding: 2rem;
    max-width: 800px;
    max-height: 80vh;
    width: 100%;
    backdrop-filter: blur(20px);
}

.log-content {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(33, 34, 44, 0.8);
    border: 1px solid #44475a;
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.log-actions {
    text-align: center;
    margin-top: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .main-card {
        padding: 1rem;
    }
    
    .progress-section, .results-section {
        padding: 1rem;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .log-overlay {
        padding: 1rem;
    }
    
    .log-modal {
        padding: 1.5rem;
    }
}