/**
 * Web Analyzer Admin Styles
 */

.web-analyzer-wrap {
    max-width: 1400px;
    margin: 20px auto;
}

.web-analyzer-container {
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.7));
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    padding: 32px;
    margin-top: 20px;
    border: 1px solid rgba(255,255,255,0.6);
    position: relative;
    overflow: hidden;
}

.web-analyzer-container:before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 200px;
    height: 200px;
    background: radial-gradient(closest-side, rgba(34,113,177,0.15), transparent);
    z-index: 0;
}

/* Form stílusok */
.web-analyzer-form {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(240,240,241,0.7);
    position: relative;
    z-index: 1;
}

.web-analyzer-form .form-group {
    margin-bottom: 20px;
}

.web-analyzer-form .form-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.web-analyzer-form .form-row .url-input-wrapper {
    flex: 1 1 auto;
    min-width: 300px;
}

.web-analyzer-form .form-row .url-input-wrapper label {
    display: block;
    margin-bottom: 8px;
}

.web-analyzer-form .form-row .device-selector-wrapper {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

.web-analyzer-form .form-row .device-selector-label {
    display: block;
    margin-bottom: 8px;
    white-space: nowrap;
}

.web-analyzer-form .form-row .device-selector {
    margin-bottom: 0;
}

.web-analyzer-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d2327;
    font-size: 14px;
}

.web-analyzer-form input[type="url"],
.web-analyzer-form select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(140,143,148,0.6);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.85);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.web-analyzer-form input[type="url"]:focus,
.web-analyzer-form select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}

.web-analyzer-form .input-large {
    font-size: 16px;
}

.web-analyzer-form .description {
    margin-top: 6px;
    font-size: 13px;
    color: #646970;
}

.web-analyzer-form #web-analyzer-submit {
    padding: 12px 24px;
    font-size: 16px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: linear-gradient(135deg, #2271b1, #2d89d6);
    box-shadow: 0 10px 20px rgba(34,113,177,0.25);
}

.web-analyzer-form #web-analyzer-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #1c5d90, #2271b1);
    border-color: #1c5d90;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(34,113,177,0.32);
}

.web-analyzer-form #web-analyzer-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Device selector */
.device-selector {
    display: grid;
    grid-auto-flow: column;
    gap: 12px;
    align-items: center;
    justify-content: start;
}

.device-selector input[type="radio"] {
    display: none;
}

.device-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(140,143,148,0.5);
    background: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    user-select: none;
}

.device-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.06);
    border-color: #2271b1;
}

.device-icon svg {
    width: 20px;
    height: 20px;
    fill: #2271b1;
}

.device-text {
    font-weight: 600;
    color: #1d2327;
}

#device-desktop:checked + label,
#device-mobile:checked + label {
    border-color: #2271b1;
    background: linear-gradient(135deg, rgba(34,113,177,0.1), rgba(34,113,177,0.05));
    box-shadow: 0 8px 16px rgba(34,113,177,0.12);
}

/* Loading spinner */
.web-analyzer-loading {
    text-align: center;
    padding: 60px 20px;
}

.web-analyzer-loading .loading-visuals {
    display: grid;
    gap: 24px;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

/* Adatfolyam animáció */
.data-stream {
    position: relative;
    width: 320px;
    height: 24px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(34,113,177,0.08);
    border: 1px solid rgba(34,113,177,0.15);
}
.data-stream span {
    position: absolute;
    top: 4px;
    width: 28px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(45,137,214,0.05), rgba(45,137,214,0.35), rgba(45,137,214,0.05));
    box-shadow: 0 6px 12px rgba(45,137,214,0.25);
    animation: flow 2.2s linear infinite;
}
.data-stream span:nth-child(1) { left: -40px; animation-delay: 0s; }
.data-stream span:nth-child(2) { left: -80px; animation-delay: .2s; }
.data-stream span:nth-child(3) { left: -120px; animation-delay: .4s; }
.data-stream span:nth-child(4) { left: -160px; animation-delay: .6s; }
.data-stream span:nth-child(5) { left: -200px; animation-delay: .8s; }
.data-stream span:nth-child(6) { left: -240px; animation-delay: 1s; }
.data-stream span:nth-child(7) { left: -280px; animation-delay: 1.2s; }
.data-stream span:nth-child(8) { left: -320px; animation-delay: 1.4s; }
.data-stream span:nth-child(9) { left: -360px; animation-delay: 1.6s; }
.data-stream span:nth-child(10){ left: -400px; animation-delay: 1.8s; }
@keyframes flow {
    0%   { transform: translateX(0) scale(0.98); opacity: 0.6; }
    50%  { transform: translateX(380px) scale(1.0); opacity: 1; }
    100% { transform: translateX(760px) scale(0.98); opacity: 0.6; }
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.web-analyzer-loading p {
    color: #646970;
    font-size: 14px;
}

.web-analyzer-loading .loading-text {
    font-size: 15px;
    color: #1d2327;
    font-weight: 600;
}

/* Grafikon épül animáció */
.bar-chart-loader {
    display: grid;
    grid-auto-flow: column;
    gap: 10px;
    align-items: end;
    height: 48px;
    width: 220px;
    margin: 0 auto;
}
.bar-chart-loader i {
    display: block;
    width: 18px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, rgba(34,113,177,0.85), rgba(45,137,214,0.55));
    box-shadow: 0 8px 16px rgba(34,113,177,0.2);
    transform-origin: bottom;
    animation: grow 1.6s ease-in-out infinite;
}
.bar-chart-loader i:nth-child(1) { height: 10px; animation-delay: 0s; }
.bar-chart-loader i:nth-child(2) { height: 18px; animation-delay: .1s; }
.bar-chart-loader i:nth-child(3) { height: 12px; animation-delay: .2s; }
.bar-chart-loader i:nth-child(4) { height: 22px; animation-delay: .3s; }
.bar-chart-loader i:nth-child(5) { height: 14px; animation-delay: .4s; }
@keyframes grow {
    0%, 100% { transform: scaleY(0.6); opacity: .8; }
    50%      { transform: scaleY(1.2); opacity: 1; }
}

/* Pulzáló pontok */
.pulse-dots {
    display: grid;
    grid-auto-flow: column;
    gap: 8px;
    justify-content: center;
}
.pulse-dots b {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #2271b1;
    opacity: .35;
    animation: pulse 1.4s ease-in-out infinite;
}
.pulse-dots b:nth-child(2) { animation-delay: .15s; }
.pulse-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes pulse {
    0%, 100% { transform: scale(.8); opacity: .35; }
    50%      { transform: scale(1.2); opacity: 1; }
}

/* Eredmények */
.web-analyzer-results {
    margin-top: 30px;
}

.web-analyzer-results-content {
    animation: fadeIn 0.5s ease-in;
}

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

.results-section {
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(249,249,249,0.8);
    border-radius: 14px;
    border: 1px solid rgba(229,229,229,0.8);
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
}

.results-section .score-subtext {
    margin-top: 10px;
    font-size: 12px;
    color: #646970;
}

.results-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #1d2327;
    border-bottom: 2px solid rgba(34,113,177,0.2);
    padding-bottom: 10px;
}

/* Reveal animáció a fokozatos megjelenítéshez */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .5s ease, transform .5s ease;
}
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* Alapinformációk */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}

.info-label {
    font-weight: 600;
    color: #646970;
    font-size: 13px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: #1d2327;
    font-size: 14px;
    word-break: break-all;
}

/* UX metrikák */
.ux-overall {
    text-align: center;
    margin-bottom: 30px;
}

.ux-category-badge {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ux-category-badge.category-fast {
    background: #00a32a;
    color: #fff;
}

.ux-category-badge.category-average {
    background: #dba617;
    color: #fff;
}

.ux-category-badge.category-slow {
    background: #d63638;
    color: #fff;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.metric-card {
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(229,229,229,0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(34,113,177,0.3);
}

.metric-header h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #1d2327;
    font-weight: 600;
    line-height: 1.4;
}

.metric-body {
    text-align: center;
}

.metric-category {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.metric-category.category-fast {
    background: #d4edda;
    color: #155724;
}

.metric-category.category-average {
    background: #fff3cd;
    color: #856404;
}

.metric-category.category-slow {
    background: #f8d7da;
    color: #721c24;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #1d2327;
}

.metric-distribution {
    margin-top: 14px;
}
.metric-distribution .dist-bar {
    display: grid;
    grid-auto-flow: column;
    gap: 0;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #eee;
}
.metric-distribution .dist-bar .bad { background: #f8d7da; }
.metric-distribution .dist-bar .mid { background: #fff3cd; }
.metric-distribution .dist-bar .good { background: #d4edda; }
.metric-distribution .dist-legend {
    margin-top: 6px;
    color: #646970;
}

/* Score körök */
.scores-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.score-card {
    text-align: center;
}

.score-label {
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 15px;
    font-size: 14px;
}

.score-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    filter: drop-shadow(0 6px 12px rgba(34,113,177,0.2));
}

.score-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: #e5e5e5;
    stroke-width: 8;
}

.score-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-in-out;
}

.score-circle.score-excellent .score-progress {
    stroke: #00a32a;
}

.score-circle.score-good .score-progress {
    stroke: #dba617;
}

.score-circle.score-poor .score-progress {
    stroke: #d63638;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    color: #1d2327;
}

/* Audit lista */
.audits-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.audit-item {
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(229,229,229,0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.audit-item:hover {
    border-color: rgba(34,113,177,0.35);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

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

.audit-header h4 {
    margin: 0;
    font-size: 16px;
    color: #1d2327;
    flex: 1;
}

.audit-score {
    font-size: 20px;
    font-weight: 700;
    margin-left: 15px;
}

.audit-score.score-pass {
    color: #00a32a;
}

.audit-score.score-warning {
    color: #dba617;
}

.audit-score.score-fail {
    color: #d63638;
}

.audit-description {
    color: #646970;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.audit-value {
    font-size: 13px;
    color: #1d2327;
    font-weight: 600;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f1;
}

/* Hibaüzenet */
.web-analyzer-error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 6px;
    padding: 20px;
    color: #721c24;
    text-align: center;
}

.web-analyzer-error .error-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.web-analyzer-error p {
    margin: 0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 782px) {
    .web-analyzer-container {
        padding: 20px;
    }

    .web-analyzer-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .scores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .scores-grid {
        grid-template-columns: 1fr;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
    }
    
    .score-text {
        font-size: 24px;
    }
}

