/* 90s Score Validator - Retro Styled CSS */

:root {
    --primary: #FF6B9D;
    --secondary: #C06C84;
    --accent: #6C5CE7;
    --bg-dark: #1a1a2e;
    --bg-light: #16213e;
    --text: #f1f1f1;
    --text-dim: #a8a8a8;
    --success: #00ff88;
    --warning: #ffd93d;
    --error: #ff6b6b;
}

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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated starfield background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 60px 70px, #fff, transparent),
        radial-gradient(1px 1px at 50px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 3s ease-in-out infinite;
    opacity: 0.5;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

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

/* Header */
header {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    padding: 30px 0;
    text-align: center;
    border-bottom: 4px solid var(--secondary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5rem;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.header-icon {
    width: 50px;
    height: 50px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.tagline {
    margin-top: 10px;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 40px 0;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--accent);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.card h3 {
    color: var(--secondary);
    margin: 20px 0 15px;
    font-size: 1.3rem;
}

/* Input Section */
.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

input[type="url"] {
    flex: 1;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid var(--accent);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-family: 'Courier New', monospace;
}

input[type="url"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.3);
}

button[type="submit"] {
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: transform 0.2s, box-shadow 0.2s;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.help-text {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Score Display */
.score-display {
    text-align: center;
    margin-bottom: 30px;
}

.score-circle {
    display: inline-block;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.score-value {
    font-size: 4rem;
    font-weight: bold;
    line-height: 1;
}

.score-label {
    font-size: 1.2rem;
    opacity: 0.8;
}

.verdict {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success);
    margin-top: 15px;
}

.url-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    word-break: break-all;
}

/* Artifacts */
.artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.artifact-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--accent);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s;
}

.artifact-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.artifact-item.detected {
    border-color: var(--success);
    background: rgba(0, 255, 136, 0.1);
}

.artifact-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.artifact-label {
    font-size: 0.9rem;
}

/* Breakdown */
.category {
    margin-bottom: 25px;
    border-left: 4px solid var(--accent);
    padding-left: 20px;
}

.category.penalty {
    border-left-color: var(--error);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.category-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.category-score {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: bold;
}

.category-items {
    list-style: none;
    padding-left: 0;
}

.category-items li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}

.category-items li:last-child {
    border-bottom: none;
}

/* History */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-table th {
    color: var(--primary);
    font-weight: bold;
}

.history-table td {
    color: var(--text-dim);
}

.history-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.score-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.score-high {
    background: var(--success);
    color: var(--bg-dark);
}

.score-medium {
    background: var(--warning);
    color: var(--bg-dark);
}

.score-low {
    background: var(--error);
    color: white;
}

/* Error */
.error-card {
    border-color: var(--error);
    text-align: center;
}

.retry-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px 0;
    text-align: center;
    border-top: 2px solid var(--accent);
    margin-top: 50px;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-note {
    margin-top: 10px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Loading state */
.loading {
    text-align: center;
    color: var(--text-dim);
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

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

    .score-circle {
        width: 150px;
        height: 150px;
    }

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

    .artifact-grid {
        grid-template-columns: 1fr;
    }
}
