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

body {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    position: relative;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

h1 {
    font-size: 3.5rem;
    font-weight: 300;
    background: linear-gradient(135deg, #00ff88, #00ccff, #ff6b6b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    margin-top: 30px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px rgba(0, 255, 136, 0.3)); }
    to { filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.6)); }
}

.subtitle {
    font-size: 1.3rem;
    color: #888;
    margin-bottom: 15px;
}

.hero-desc {
    font-size: 1.1rem;
    color: #bbb;
    max-width: 700px;
    margin: 0 auto;
}

.form-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    color: #00ff88;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tooltip Styles */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: #00ccff;
    cursor: help;
    position: relative;
    transition: all 0.3s ease;
}

.tooltip-icon:hover {
    background: rgba(0, 204, 255, 0.2);
    border-color: #00ccff;
    transform: scale(1.1);
}

.tooltip-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    border: 1px solid rgba(0, 204, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 250px;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
}

.tooltip-icon::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.tooltip-icon:hover::before,
.tooltip-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

input, select {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.help-text {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
}

.analyze-btn {
    background: linear-gradient(135deg, #00ff88, #00ccff);
    border: none;
    border-radius: 15px;
    padding: 18px 40px;
    color: #000;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.analyze-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 255, 136, 0.4);
}

.analyze-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Message Styles */
.error-message {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    animation: slideDown 0.3s ease-out;
    text-align: center;
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    font-size: 1.2rem;
    color: #ff6b6b;
}

.error-text {
    flex: 1;
    color: #ff9999;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
}

.error-close {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.error-close:hover {
    background: rgba(255, 107, 107, 0.2);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-section {
    display: none;
    animation: slideUp 0.6s ease-out;
}

.results-section.active {
    display: block;
}

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

.progress-header {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.progress-stat {
    text-align: center;
}

.progress-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ff88;
    display: block;
}

.progress-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    margin-top: 5px;
}

.status-indicator {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-analyzing {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 2px solid #ffd700;
}

.status-complete {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 2px solid #00ff88;
}

/* Target Value Cards */
.target-cards-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cards-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.cards-title {
    color: #00ff88;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.target-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.target-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    border-left: 4px solid #00ccff;
}

.target-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00ccff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-count {
    background: linear-gradient(135deg, #00ff88, #00ccff);
    color: #000;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-services {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
}

.card-service-name {
    color: #e0e0e0;
    font-weight: 500;
}

.card-service-percentage {
    color: #00ff88;
    font-weight: 600;
    font-size: 0.85rem;
}

.card-service-percentage.zero {
    color: #666;
}

.services-breakdown {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.services-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.services-title {
    color: #00ff88;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 3px solid #00ff88;
}

.service-name {
    font-weight: 600;
    color: #e0e0e0;
}

.service-stats {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
}

.service-count {
    color: #00ccff;
    font-weight: 600;
}

.service-percentage {
    color: #00ff88;
    font-weight: 600;
}

.results-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.panel-title {
    color: #00ff88;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-stream {
    max-height: 600px;
    overflow-y: auto;
}

.result-row {
    display: grid;
    grid-template-columns: 140px 3fr 120px 120px;
    gap: 20px;
    padding: 20px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid #00ff88;
    animation: slideInResult 0.4s ease-out;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.result-row:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@keyframes slideInResult {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.result-ns {
    font-weight: 600;
    color: #00ccff;
    font-size: 0.95rem;
}

.result-details {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.5;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.result-details strong {
    color: #e0e0e0;
}

.ns-line, .ip-line, .cname-line {
    margin-bottom: 3px;
}

.ip-line, .cname-line {
    padding-left: 4px;
}

.ns-line strong { color: #00ccff; }
.ip-line strong { color: #00ff88; }
.cname-line strong { color: #ffd700; }

.result-location {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

.result-service {
    text-align: center;
}

.service-badge {
    background: linear-gradient(135deg, #00ff88, #00ccff);
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .result-row { grid-template-columns: 1fr 2fr 1fr; }
    .result-location { display: none; }
    .target-cards-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .progress-info { flex-direction: column; gap: 15px; }
    .services-list { grid-template-columns: 1fr; }
    .target-cards-grid { grid-template-columns: 1fr; }
    .result-row { grid-template-columns: 1fr; gap: 10px; text-align: left; }
    .result-details { font-size: 0.8rem; }
    h1 { 
        font-size: 2.2rem;
        margin-top: 30px;	
    }
    .container { padding: 15px; }
    
    .progress-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cards-header, .services-header, .panel-header {
        text-align: center;
    }

    header {
        padding: 20px 0;
    }
}

/* Login Page Styles */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 2rem;
    font-weight: 300;
    background: linear-gradient(135deg, #00ff88, #00ccff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #888;
    font-size: 1rem;
}

/* Login Error Message Styles */
.login-error-container {
    height: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: 5px;
}

.login-error-message {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    animation: slideDown 0.3s ease-out;
    text-align: center;
    width: 100%;
}

.login-error-message .error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-error-message .error-icon {
    font-size: 1.1rem;
    color: #ff6b6b;
}

.login-error-message .error-text {
    color: #ff9999;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #00ff88, #00ccff);
    border: none;
    border-radius: 15px;
    padding: 18px;
    color: #000;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 30px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 255, 136, 0.4);
}

/* User Info & Logout Button */
.user-info {
    position: absolute;
    top: 0px;
    right: 0px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 20px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.15);
}

.logout-link {
    color: #ff6b6b;
    cursor: pointer;
    margin-left: 5px;
}

.logout-link:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    color: #888;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.1); border-radius: 5px; }
::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #00ff88, #00ccff); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(135deg, #00ccff, #00ff88); }
