/* GhostLink URL Security Scanner - Optimized Dark Dashboard */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #0f0f1a 100%);
    color: #e8e8e8;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Header */
.header {
    margin-bottom: 50px;
    text-align: center;
}

.header-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #00ff41;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.08);
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #00ff41;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: #00ff41;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.description {
    font-size: 0.95rem;
    color: rgba(232, 232, 232, 0.6);
    margin-top: 10px;
}

/* Dashboard */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Input Section */
.input-section {
    background: #14141e;
    border: 1px solid #00ff41;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.05);
}

.input-wrapper {
    width: 100%;
}

.input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #00ff41;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.url-input {
    flex: 1;
    background: #0a0a0a;
    border: 1.5px solid #00ff41;
    border-radius: 8px;
    padding: 14px 18px;
    color: #e8e8e8;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.url-input:focus {
    border-color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3), inset 0 0 10px rgba(0, 255, 65, 0.1);
    background: #0f0f1a;
}

.url-input::placeholder {
    color: rgba(232, 232, 232, 0.3);
}

.analyze-btn {
    background: #00ff41;
    border: none;
    border-radius: 8px;
    padding: 14px 40px;
    color: #0a0a0a;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analyze-btn:hover {
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

.analyze-btn:active {
    transform: translateY(0);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-hint {
    font-size: 0.85rem;
    color: rgba(232, 232, 232, 0.4);
}

/* Results Section */
.results-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Score Card */
.score-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1.5px solid #00ff41;
    border-radius: 12px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.08);
}

.score-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #00ff41;
    margin-bottom: 20px;
    letter-spacing: 1px;
    font-weight: 700;
}

.score-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
}

.score-value {
    font-size: 4rem;
    font-weight: 700;
    color: #00ff41;
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.score-max {
    font-size: 1.3rem;
    color: rgba(232, 232, 232, 0.4);
}

.risk-badge {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: 1.5px solid;
    margin-bottom: 15px;
}

.risk-badge[data-level="low"] {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border-color: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
}

.risk-badge[data-level="medium"] {
    background: rgba(255, 170, 0, 0.12);
    color: #ffb84d;
    border-color: #ffaa00;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.1);
}

.risk-badge[data-level="high"] {
    background: rgba(255, 51, 51, 0.12);
    color: #ff6b6b;
    border-color: #ff3333;
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.1);
}

.score-hint {
    font-size: 0.9rem;
    color: rgba(232, 232, 232, 0.6);
    margin-bottom: 15px;
}

.score-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00ff41;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-explanation {
    font-size: 0.9rem;
    color: rgba(232, 232, 232, 0.5);
    margin-bottom: 20px;
    line-height: 1.5;
}

.risk-explanation {
    font-size: 0.85rem;
    color: rgba(232, 232, 232, 0.4);
    margin-top: 10px;
    font-style: italic;
}

.score-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #ffaa00, #ff3333);
    width: 0%;
    transition: width 0.6s ease;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: #0a0a0a;
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.15);
    background: rgba(0, 255, 65, 0.05);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #00ff41;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(232, 232, 232, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.stat-desc {
    font-size: 0.75rem;
    color: rgba(232, 232, 232, 0.4);
    margin-top: 4px;
}

/* Findings Card */
.findings-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1.5px solid #00ff41;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.08);
}

.findings-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #00ff41;
    margin-bottom: 25px;
    letter-spacing: 1px;
    font-weight: 700;
}

.findings-description {
    font-size: 0.9rem;
    color: rgba(232, 232, 232, 0.5);
    margin-bottom: 20px;
    line-height: 1.5;
}

.findings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.finding-category-group {
    margin-bottom: 10px;
}

.finding-category-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #ffaa00;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 3px solid #ffaa00;
}

.finding-item {
    background: #0a0a0a;
    border-left: 4px solid #00ff41;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.2s ease;
}

.finding-item:hover {
    background: rgba(0, 255, 65, 0.08);
    border-left-color: #4ade80;
}

.finding-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.finding-type {
    font-weight: 700;
    color: #00ff41;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.finding-severity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.finding-severity.severity-low {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.finding-severity.severity-medium {
    background: rgba(255, 170, 0, 0.2);
    color: #ffb84d;
    border: 1px solid rgba(255, 170, 0, 0.5);
}

.finding-severity.severity-high {
    background: rgba(255, 51, 51, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 51, 51, 0.5);
}

.finding-description {
    color: rgba(232, 232, 232, 0.75);
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.finding-points {
    background: rgba(0, 255, 65, 0.15);
    color: #4ade80;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 5px 14px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.points-icon {
    font-size: 0.9rem;
}

.points-value {
    white-space: nowrap;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 80px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 255, 65, 0.15);
    border-top-color: #00ff41;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: #00ff41;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Error Message */
.error-message {
    background: rgba(255, 51, 51, 0.1);
    border: 1.5px solid rgba(255, 51, 51, 0.5);
    border-radius: 8px;
    padding: 20px;
    color: #ff6b6b;
    text-align: center;
    font-size: 0.95rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(232, 232, 232, 0.4);
}

.empty-state p {
    font-size: 1rem;
}

/* Info Section */
.info-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 255, 65, 0.1);
}

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

.info-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
    transform: translateY(-5px);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.info-card h3 {
    color: #00ff41;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.info-card p {
    color: rgba(232, 232, 232, 0.6);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Details Card */
.details-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1.5px solid #00ff41;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.08);
    margin-top: 20px;
}

.details-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #00ff41;
    margin-bottom: 25px;
    letter-spacing: 1px;
    font-weight: 700;
}

.details-description {
    font-size: 0.9rem;
    color: rgba(232, 232, 232, 0.5);
    margin-bottom: 25px;
    line-height: 1.5;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.detail-section {
    background: #0a0a0a;
    border-left: 4px solid #00ff41;
    border-radius: 8px;
    padding: 20px;
}

.detail-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #00ff41;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-subtitle {
    font-size: 0.8rem;
    color: rgba(232, 232, 232, 0.4);
    margin-bottom: 12px;
    line-height: 1.4;
}

.detail-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 255, 65, 0.2);
    color: #00ff41;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: help;
    border: 1px solid rgba(0, 255, 65, 0.4);
}

.detail-tooltip:hover {
    background: rgba(0, 255, 65, 0.3);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.9rem;
    color: rgba(232, 232, 232, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-value {
    font-size: 0.9rem;
    color: #00ff41;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
    max-width: 60%;
}

.detail-value.header-present {
    color: #4ade80;
}

.detail-value.header-missing {
    color: #ff6b6b;
}

/* Recommendations Card */
.recommendations-card {
    background: linear-gradient(135deg, #1a2a3e 0%, #1a1a2e 100%);
    border: 1.5px solid #ffb84d;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 0 25px rgba(255, 170, 0, 0.08);
    margin-top: 20px;
}

.rec-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #ffb84d;
    margin-bottom: 20px;
    letter-spacing: 1px;
    font-weight: 700;
}

.rec-description {
    font-size: 0.9rem;
    color: rgba(232, 232, 232, 0.5);
    margin-bottom: 20px;
    line-height: 1.5;
}

.rec-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rec-item {
    background: #0a0a0a;
    border-left: 4px solid #ffaa00;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.2s ease;
}

.rec-item:hover {
    background: rgba(255, 170, 0, 0.08);
    border-left-color: #ffb84d;
}

.rec-item.rec-critical {
    border-left-color: #ff3333;
    background: rgba(255, 51, 51, 0.05);
}

.rec-item.rec-critical:hover {
    background: rgba(255, 51, 51, 0.12);
    border-left-color: #ff6b6b;
}

.rec-item.rec-high {
    border-left-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

.rec-item.rec-high:hover {
    background: rgba(255, 107, 107, 0.12);
    border-left-color: #ff8888;
}

.rec-item.rec-medium {
    border-left-color: #ffb84d;
    background: rgba(255, 170, 0, 0.05);
}

.rec-item.rec-medium:hover {
    background: rgba(255, 170, 0, 0.12);
}

.rec-item.rec-info {
    border-left-color: #00ff41;
    background: rgba(0, 255, 65, 0.05);
}

.rec-item.rec-info:hover {
    background: rgba(0, 255, 65, 0.12);
    border-left-color: #4ade80;
}

.rec-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.rec-text {
    font-size: 0.9rem;
    color: rgba(232, 232, 232, 0.85);
    line-height: 1.5;
    word-break: break-word;
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .title {
        font-size: 2rem;
    }

    .score-value {
        font-size: 2.5rem;
    }

    .header-content {
        padding: 25px;
    }

    .input-group {
        flex-direction: column;
    }

    .analyze-btn {
        width: 100%;
    }
}
