:root {
    --text-dark: #1c1c1e;
    --text-secondary: #6c757d;
    --background-light: #f2f2f7;
    --card-background: #ffffff;
    --primary-blue: #007aff;
    --primary-green: #34c759;
    --primary-red: #ff3b30;
    --primary-yellow: #ffcc00;
}

body {
    background: var(--background-light);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "San Francisco", Helvetica, Arial, sans-serif;
}

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

.title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.main-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}
.main-title span { display: block; }

.back-link {
    width: 44px; height: 44px;
    background: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.control-card {
    background: var(--card-background);
    border-radius: 26px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    text-align: center;
}

.control-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.password-input-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.password-input-wrapper input {
    flex: 1;
    padding: 1rem;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    font-size: 1rem;
    background: #f9f9f9;
}
.btn-primary {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }

/* Results */
.score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 3rem;
}

.score-circle {
    width: 150px; height: 150px;
    border-radius: 50%;
    border: 8px solid var(--primary-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: white;
    transition: border-color 0.5s ease, color 0.5s ease;
}
.score-circle.medium { border-color: var(--primary-yellow); }
.score-circle.low { border-color: var(--primary-red); }

.score-label { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
.score-status { margin-top: 1rem; font-size: 1.5rem; font-weight: 700; }

/* Sections */
.diagnostic-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    color: white;
}
.section-header h3 { margin: 0; font-size: 1.1rem; }
.count-badge {
    background: rgba(255,255,255,0.3);
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 700;
}

.section-header.error { background-color: var(--primary-red); }
.section-header.warning { background-color: var(--primary-yellow); color: #5c4000; } /* Darker text for contrast */
.section-header.info { background-color: #8e8e93; }

.items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.diag-item {
    background: white;
    padding: 1.2rem;
    border-radius: 16px;
    border-left: 4px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.diag-item.critical { border-left-color: var(--primary-red); }
.diag-item.warning { border-left-color: var(--primary-yellow); }
.diag-item.info { border-left-color: #8e8e93; }

.item-file { 
    font-weight: 700; 
    font-family: monospace; 
    margin-bottom: 0.5rem; 
    display: block;
    word-break: break-all; /* Для переноса длинных путей файлов */
}
.item-msg { 
    margin-bottom: 1rem; 
    line-height: 1.4;
    word-break: break-all; /* Для переноса длинных сообщений с URL */
}
.item-actions { text-align: right; }

.btn-copy-prompt {
    background: #e5e5ea;
    color: var(--text-dark);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 500;
}
.btn-copy-prompt:hover { background: #d1d1d6; }
