:root {
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border-light: #e2e8f0;
    --border-focus: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-blue-dark: #2563eb;
    --safe-green: #10b981;
    --warning-orange: #f59e0b;
    --danger-red: #ef4444;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

.app {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.badge {
    background: #e9eef2;
    padding: 0.2rem 0.6rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main {
    margin-bottom: 3rem;
}

/* Input Section */
.input-section {
    background: var(--bg-card);
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.url-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: 20px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--bg-primary);
}

.url-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1);
}

.check-btn {
    padding: 0 2rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.check-btn:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.2s;
}

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

/* Examples */
.examples {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.examples-label {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-weight: 500;
}

.example-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.example-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1.5px solid var(--border-light);
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.example-btn:hover {
    background: var(--bg-primary);
    border-color: var(--text-tertiary);
}

/* Loading State */
.loading-state {
    background: var(--bg-card);
    border-radius: 32px;
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Results Section */
.results-section {
    animation: fadeIn 0.4s ease-out;
}

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

.result-card {
    background: var(--bg-card);
    border-radius: 32px;
    padding: 2rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.result-icon {
    width: 64px;
    height: 64px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.result-icon.safe {
    background: #e6f7e6;
    color: var(--safe-green);
}

.result-icon.warning {
    background: #fff4e6;
    color: var(--warning-orange);
}

.result-icon.danger {
    background: #fee9e7;
    color: var(--danger-red);
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.result-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Risk Meter */
.risk-meter {
    margin-bottom: 2rem;
}

.risk-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.risk-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.risk-score {
    font-weight: 700;
    color: var(--text-primary);
}

.progress-track {
    height: 8px;
    background: var(--border-light);
    border-radius: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 20px;
}

/* Analysis Details */
.analysis-details {
    margin-bottom: 2rem;
}

.details-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.checks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 16px;
    border-left: 4px solid;
    transition: transform 0.2s;
}

.check-item:hover {
    transform: translateX(4px);
}

.check-item.pass {
    border-left-color: var(--safe-green);
}

.check-item.warn {
    border-left-color: var(--warning-orange);
}

.check-item.fail {
    border-left-color: var(--danger-red);
}

.check-icon {
    font-size: 1.25rem;
    min-width: 24px;
}

.check-content {
    flex: 1;
}

.check-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.check-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Recommendation Box */
.recommendation-box {
    padding: 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
}

.recommendation-box.safe {
    background: #e6f7e6;
    color: #065f46;
}

.recommendation-box.warning {
    background: #fff4e6;
    color: #92400e;
}

.recommendation-box.danger {
    background: #fee9e7;
    color: #991b1b;
}

/* Error State */
.error-state {
    background: var(--bg-card);
    border-radius: 32px;
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.error-btn {
    padding: 0.75rem 2rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.error-btn:hover {
    background: var(--accent-blue-dark);
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

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

/* Responsive */
@media (max-width: 640px) {
    .app {
        padding: 1rem;
    }
    
    .input-section {
        padding: 1.5rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .check-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .examples {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .result-header {
        flex-direction: column;
        text-align: center;
    }
}
