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

body {
    background: #1e2a30;
    color: #e8e8e8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.4rem;
    color: #6CD0F6;
    font-weight: 300;
    letter-spacing: 0.1em;
}

.subtitle {
    color: #8a9da8;
    margin-top: 8px;
    font-size: 1rem;
}

.input-section {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

#url-input {
    flex: 1;
    padding: 14px 16px;
    background: #253840;
    border: 1px solid #3a5060;
    border-radius: 8px;
    color: #e8e8e8;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#url-input:focus {
    border-color: #6CD0F6;
}

#url-input::placeholder {
    color: #5a7a8a;
}

#check-btn {
    padding: 14px 28px;
    background: #6CD0F6;
    color: #1e2a30;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

#check-btn:hover {
    opacity: 0.85;
}

#check-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #3a5060;
    border-top-color: #6CD0F6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.loading p {
    color: #8a9da8;
    font-size: 0.9rem;
}

/* Error */
.error {
    background: #3a2020;
    border: 1px solid #6b3030;
    border-radius: 8px;
    padding: 16px;
    color: #ff8a8a;
    text-align: center;
}

/* Result */
.score-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.score-ring {
    width: 100px;
    height: 100px;
    border: 4px solid #888;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-number {
    font-size: 2.2rem;
    font-weight: 700;
}

.score-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-rating {
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: capitalize;
}

.score-basis {
    color: #8a9da8;
    font-size: 0.9rem;
}

/* Claims */
.claims-section {
    margin-bottom: 24px;
}

.claims-section h3 {
    color: #6CD0F6;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.claims-section ul {
    list-style: none;
    padding: 0;
}

.claims-section li {
    background: #253840;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

/* Summary */
.summary-section {
    background: #253840;
    border-left: 3px solid #6CD0F6;
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: #c0d0d8;
}

/* Sources */
.sources-section h3 {
    color: #6CD0F6;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-icon {
    font-size: 0.7rem;
    margin-left: 4px;
}

.sources-list.collapsed {
    display: none;
}

.source-item {
    background: #253840;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.source-title {
    color: #e8e8e8;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
}

.source-title:hover {
    color: #6CD0F6;
}

.stance-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.stance-supports {
    background: #1b3a1b;
    color: #4CAF50;
}

.stance-contradicts {
    background: #3a1b1b;
    color: #FF5722;
}

.stance-neutral {
    background: #2a2a1b;
    color: #FFC107;
}

.source-meta {
    color: #6a8a9a;
    font-size: 0.8rem;
    margin-top: 4px;
}

.source-reason {
    color: #8a9da8;
    font-size: 0.8rem;
    margin-top: 6px;
    font-style: italic;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #2a3a42;
}

footer p {
    color: #5a7a8a;
    font-size: 0.85rem;
}

footer a {
    color: #6CD0F6;
    text-decoration: none;
}

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

/* Login */
.login-form {
    max-width: 320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form input[type="password"] {
    padding: 14px 16px;
    background: #253840;
    border: 1px solid #3a5060;
    border-radius: 8px;
    color: #e8e8e8;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    text-align: center;
}

.login-form input[type="password"]:focus {
    border-color: #6CD0F6;
}

.login-form input[type="password"]::placeholder {
    color: #5a7a8a;
}

.login-form button {
    padding: 14px 28px;
    background: #6CD0F6;
    color: #1e2a30;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.login-form button:hover {
    opacity: 0.85;
}

.login-form .error {
    margin-bottom: 4px;
}

/* Utility */
.hidden {
    display: none;
}

@media (max-width: 480px) {
    .container {
        padding: 40px 16px 32px;
    }

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

    .score-section {
        flex-direction: column;
        text-align: center;
    }
}
