@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #151932;
    --bg-card: rgba(30, 35, 60, 0.6);
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --border-radius: 16px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-10%, -10%);
    }
}

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

header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.form-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.demo-notice {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--border-radius);
    padding: 20px 30px;
    margin-bottom: 40px;
    text-align: center;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

.demo-notice p {
    color: var(--text-primary);
    margin: 0;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

input[type="url"],
input[type="text"] {
    flex: 1;
    padding: 20px 28px;
    font-size: 1.15rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    font-weight: 400;
    letter-spacing: 0.3px;
}

input[type="url"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 8px 24px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

input[type="url"]::placeholder,
input[type="text"]::placeholder {
    color: var(--text-secondary);
    font-weight: 300;
}

button {
    padding: 18px 36px;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    font-family: 'Inter', sans-serif;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

button:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

button:hover .btn-icon {
    transform: translateX(4px);
}

.result-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.8s ease;
}

.result-section.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.score-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.score-circle {
    position: relative;
    width: 160px;
    height: 160px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.progress-ring-circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 440;
    stroke-dashoffset: 440;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.excellent .progress-ring-circle {
    stroke: var(--success);
}

.good .progress-ring-circle {
    stroke: var(--info);
}

.fair .progress-ring-circle {
    stroke: var(--warning);
}

.poor .progress-ring-circle {
    stroke: var(--error);
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Category Section Styles */
.category-section {
    margin-bottom: 40px;
}

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

.category-header h2 {
    font-size: 1.5rem;
    margin: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-score {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
}

.findings h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    text-align: center;
}

.findings-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

/* Re-Validation Button */
.revalidation-button-container {
    text-align: center;
    margin: 30px 0;
}

.revalidation-btn {
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    font-family: 'Inter', sans-serif;
}

.revalidation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

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

/* Re-Validation Result */
.revalidation-result {
    margin-bottom: 30px;
}

.revalidation-result h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.finding-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.finding-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.finding-card.success {
    border-left-color: var(--success);
}

.finding-card.warning {
    border-left-color: var(--warning);
}

.finding-card.error {
    border-left-color: var(--error);
}

.finding-card.info {
    border-left-color: var(--info);
}

.finding-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.finding-icon {
    font-size: 1.3rem;
}

.finding-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.finding-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding-left: 32px;
    word-break: break-all;
}

.finding-explanation {
    margin-top: 12px;
    padding: 12px 16px;
    padding-left: 32px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.finding-explanation strong {
    color: var(--text-primary);
    font-weight: 600;
}

.reload-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    vertical-align: middle;
}

.reload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.88rem;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: rgba(102, 126, 234, 0.1);
    margin-left: 8px;
}

.guide-link:hover {
    background: rgba(102, 126, 234, 0.2);
    color: var(--accent-secondary);
    text-decoration: none;
}

.http-info {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.http-info p {
    color: var(--text-secondary);
    margin: 8px 0;
}

.http-info strong {
    color: var(--text-primary);
}

footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .form-section {
        padding: 30px 20px;
    }

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

    button {
        justify-content: center;
    }

    .result-section {
        padding: 30px 20px;
    }
}