/* ===== BASE STYLES ===== */
body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #1B1B1F;
    color: #ffffff;
    line-height: 1.6;
}

.wrapper {
    text-align: left;
}

/* ===== RESULTS HEADER ===== */
.results-header {
    max-width: 900px;
    margin: 0 auto 30px;
    text-align: center;
    padding-top: 20px;
}

.results-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
    color: #fff;
}

/* ===== SEARCH STATS CONTAINER ===== */
.containerSearchStats {
    max-width: 800px;
    background: linear-gradient(to right, #26262C, #2d2d35);
    border-radius: 12px;
    margin: 30px auto;
    padding: 25px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.stat-item {
    flex: 1;
    min-width: 0;
    padding: 10px 15px;
    position: relative;
    text-align: left;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.stat-item:last-child {
    border-right: none;
}

.stat-label {
    font-size: 14px;
    color: #9b9ba7;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #9b59b6;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-all;
}

/* ===== CARD LAYOUT ===== */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 10px auto;
}

.card {
    position: relative;
    padding: 20px;
    overflow-y: auto;
    max-height: 290px;
    background: linear-gradient(145deg, #26262C, #2a2a32);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border: 1px solid rgba(155, 89, 182, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    border-color: rgba(155, 89, 182, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(155, 89, 182, 0.1);
    padding: 15px 20px;
    padding-right: 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #9b59b6;
    margin: 0;
    display: flex;
    align-items: center;
}

.avatar-container {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.avatar {
    max-width: 60px;
    max-height: 60px;
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== FIELD STYLING ===== */
.field {
    display: flex;
    margin-bottom: 7px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    align-items: flex-start;
}

.field a {
    color: #6eb1ff;
}

.key {
    font-weight: 500;
    color: #9b9ba7;
    flex: 0 0 35%;
    padding-right: 10px;
    text-align: left;
}

.value {
    flex: 0 0 65%;
    color: #ffffff;
    overflow-wrap: break-word;
    word-break: break-all;
    max-width: 100%;
}

.value a {
    word-break: break-all;
    text-decoration: underline;
    color: #9b59b6;
}

/* ===== DATE STYLING ===== */
.value.date {
    position: relative;
    background: rgba(155, 89, 182, 0.1);
    border-left: 2px solid #9b59b6;
    padding: 3px 8px;
    border-radius: 0 4px 4px 0;
    transition: all 0.2s ease;
    display: inline-block;
}

.value.date:hover {
    background: rgba(155, 89, 182, 0.2);
}

.value.date:hover::after {
    content: attr(data-time-ago);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d2d35;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(155, 89, 182, 0.5);
    z-index: 10;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

.value.date:hover::before {
    content: '';
    position: absolute;
    bottom: 98%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2d2d35;
    z-index: 11;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

/* ===== BLUR EFFECTS ===== */
.blur-notice {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    padding: 20px;
    border-radius: 12px;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.3);
}

.blur-notice h3 {
    margin: 0 0 10px 0;
    color: white;
}

.blur-notice p {
    margin: 10px 0;
    color: white;
    opacity: 0.9;
}

.upgrade-btn {
    background: white;
    color: #ee5a24;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.upgrade-btn:hover {
    transform: scale(1.05);
}

.blurred {
    filter: blur(6px);
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    user-select: none;
    pointer-events: none;
}

.blurred-text {
    filter: blur(1px);
    background: rgba(155, 89, 182, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border-left: 3px solid #9b59b6;
}

/* ===== EXPORT BUTTONS ===== */
.export-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
}

.export-buttons button {
    background: #2d2d33;
    border: 1px solid rgba(155, 89, 182, 0.3);
    color: #ffffff;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
    min-width: 150px;
}

.export-buttons button:hover {
    background: #36363d;
    border-color: #9b59b6;
    transform: translateY(-2px);
}

/* ===== LIMITED NOTICE ===== */
.limited-notice {
    background-color: #2d2d33;
    border-left: 4px solid #9b59b6;
    padding: 25px;
    margin: 40px auto;
    max-width: 800px;
    border-radius: 8px;
    text-align: left;
    font-size: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.limited-notice strong {
    color: #9b59b6;
}

.limited-notice.blurred {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-left-color: #e74c3c;
}

/* ===== REGISTERED SITES SECTION ===== */
.registered-sites-section {
    background: #26262C;
    border-radius: 10px;
    padding: 30px;
    margin: 30px auto;
    max-width: 1200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: white;
}

.registered-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.registered-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.registered-icon {
    width: 24px;
    height: 24px;
    stroke: #6A0DAD;
}

.registered-title h3 {
    margin: 0;
    font-size: 20px;
}

.total-count {
    background: rgba(106, 13, 173, 0.2);
    color: #6A0DAD;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.site-search {
    background: #1B1B1F;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px 35px 8px 12px;
    color: white;
    font-size: 14px;
    width: 200px;
}

.site-search:focus {
    outline: none;
    border-color: #6A0DAD;
    box-shadow: 0 0 5px rgba(106, 13, 173, 0.3);
}

.search-icon {
    position: absolute;
    right: 10px;
    width: 16px;
    height: 16px;
    stroke: #666;
}

/* ===== HIGH RISK WARNING ===== */
.high-risk-warning {
    background: linear-gradient(135deg, rgba(255, 70, 70, 0.1), rgba(255, 70, 70, 0.05));
    border: 2px solid #ff4646;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    animation: warningPulse 3s ease-in-out infinite;
}

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

.warning-icon {
    width: 24px;
    height: 24px;
    stroke: #ff4646;
}

.warning-header h4 {
    margin: 0;
    color: #ff4646;
    font-size: 18px;
}

.risk-count {
    background: rgba(255, 70, 70, 0.2);
    color: #ff4646;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== EXPANDABLE WARNING DESCRIPTION ===== */
.expandable-info {
    margin-bottom: 20px;
}

.expand-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: rgba(255, 70, 70, 0.1);
    border: 1px solid rgba(255, 70, 70, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ff9999;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.expand-toggle:hover {
    background: rgba(255, 70, 70, 0.15);
    border-color: rgba(255, 70, 70, 0.4);
    transform: translateY(-1px);
}

.expand-toggle:focus {
    box-shadow: 0 0 0 2px rgba(255, 70, 70, 0.3);
}

.expand-toggle:focus-visible {
    outline: 2px solid #ff4646;
    outline-offset: 2px;
}

.expand-text {
    font-size: 15px;
    color: #ff8888;
}

.expand-icon {
    width: 20px;
    height: 20px;
    stroke: #ff4646;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.warning-description {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 0 8px 8px;
    border: 1px solid rgba(255, 70, 70, 0.2);
    border-top: none;
}

.warning-description.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0 20px;
    margin-top: 0;
    border-color: transparent;
}

.warning-description.expanded {
    max-height: 600px;
    opacity: 1;
    padding: 20px;
    margin-top: 0;
    border-color: rgba(255, 70, 70, 0.2);
}

.description-content {
    padding: 0;
}

.warning-description p {
    margin: 0 0 12px 0;
    color: #ffcccc;
    line-height: 1.5;
}

.warning-description p strong {
    color: #ff8888;
}

.risk-concerns {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.risk-concerns li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(255, 70, 70, 0.05);
    border-radius: 6px;
    color: #ffdddd;
    font-size: 14px;
    transform: translateX(0);
    transition: transform 0.2s ease;
}

.warning-description.expanded .risk-concerns li {
    animation: slideInFromLeft 0.3s ease-out;
}

.warning-description.expanded .risk-concerns li:nth-child(1) {
    animation-delay: 0.1s;
}

.warning-description.expanded .risk-concerns li:nth-child(2) {
    animation-delay: 0.2s;
}

.warning-description.expanded .risk-concerns li:nth-child(3) {
    animation-delay: 0.3s;
}

.warning-description.expanded .risk-concerns li:nth-child(4) {
    animation-delay: 0.4s;
}

.risk-concerns li strong {
    color: #ff9999;
}

.recommendation {
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 6px;
    padding: 12px;
    color: #ffcc99 !important;
    font-style: italic;
    margin-top: 15px !important;
}

/* ===== RISK SITES LIST ===== */
.risk-sites-inline-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.risk-site-inline {
    background: rgba(255, 70, 70, 0.05);
    border: 1px solid rgba(255, 70, 70, 0.15);
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.2s ease;
    animation: slideInLeft 0.3s ease-out;
}

.risk-site-inline:hover {
    background: rgba(255, 70, 70, 0.08);
    border-color: rgba(255, 70, 70, 0.25);
    transform: translateX(3px);
}

.risk-site-inline:nth-child(1) {
    animation-delay: 0.1s;
}

.risk-site-inline:nth-child(2) {
    animation-delay: 0.2s;
}

.risk-site-inline:nth-child(3) {
    animation-delay: 0.3s;
}

.risk-site-inline:nth-child(4) {
    animation-delay: 0.4s;
}

.risk-site-inline:nth-child(5) {
    animation-delay: 0.5s;
}

.site-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.risk-site-icon {
    width: 18px;
    height: 18px;
    stroke: #ff4646;
    flex-shrink: 0;
}

.risk-site-name {
    font-weight: 600;
    color: #ff9999;
    font-size: 15px;
    flex-grow: 1;
}

.risk-type-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid;
    white-space: nowrap;
    flex-shrink: 0;
}

.risk-site-inline:hover .risk-type-inline {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 70, 70, 0.2);
}

/* ===== CATEGORIES GRID ===== */
.categories-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0 20px 0;
    scrollbar-width: thin;
    scrollbar-color: #6A0DAD #1B1B1F;
    position: relative;
}

.categories-grid::-webkit-scrollbar {
    height: 8px;
}

.categories-grid::-webkit-scrollbar-track {
    background: #1B1B1F;
    border-radius: 4px;
}

.categories-grid::-webkit-scrollbar-thumb {
    background: #6A0DAD;
    border-radius: 4px;
}

.categories-grid::-webkit-scrollbar-thumb:hover {
    background: #7d29d2;
}

.categories-grid::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 30px;
    background: linear-gradient(to left, #26262C, transparent);
    pointer-events: none;
    border-radius: 0 10px 10px 0;
}

.category-card {
    background: linear-gradient(135deg, #1B1B1F, #242429);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    min-width: 350px;
    max-width: 350px;
    flex-shrink: 0;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: #6A0DAD;
}

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

.category-icon-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-emoji {
    font-size: 20px;
}

.category-header h4 {
    margin: 0;
    font-size: 16px;
    color: white;
}

.category-count {
    background: rgba(106, 13, 173, 0.2);
    color: #6A0DAD;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.category-description {
    color: #999;
    font-size: 13px;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

/* ===== SITES LIST ===== */
.sites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #6A0DAD #1B1B1F;
}

.sites-list::-webkit-scrollbar {
    width: 4px;
}

.sites-list::-webkit-scrollbar-track {
    background: #1B1B1F;
}

.sites-list::-webkit-scrollbar-thumb {
    background: #6A0DAD;
    border-radius: 2px;
}

.site-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.site-item:hover {
    background: rgba(106, 13, 173, 0.15);
    border-color: rgba(106, 13, 173, 0.3);
    transform: scale(1.05);
}

.site-favicon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.site-favicon img {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.site-fallback-icon {
    font-size: 12px;
}

.site-name {
    font-size: 13px;
    color: #ccc;
}

/* ===== SCROLL INDICATORS ===== */
.categories-scroll-hint {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    color: #666;
    font-size: 12px;
    animation: fadeIn 3s ease-out;
}

.categories-scroll-hint svg {
    width: 16px;
    height: 16px;
    margin-left: 5px;
    stroke: #6A0DAD;
    animation: slideRight 2s ease-in-out infinite;
}

/* ===== LOADING STATES ===== */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #9b9ba7;
    font-style: italic;
}

.loading-text {
    animation: pulse 1.5s infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

@keyframes slideRight {

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

    50% {
        transform: translateX(5px);
    }
}

@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes slideFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes warningPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 70, 70, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 70, 70, 0.5);
    }
}

.design-feedback-banner.hide {
    animation: slideFadeOut 0.5s ease forwards;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .card-container {
        grid-template-columns: 1fr;
    }

    .stat-item {
        flex: 0 0 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .registered-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        justify-content: center;
    }

    .site-search {
        width: 100%;
    }

    .category-card {
        min-width: 280px;
        max-width: 280px;
    }

    .categories-grid {
        gap: 15px;
        padding: 10px 0 15px 0;
    }

    .site-item {
        padding: 5px 10px;
        font-size: 12px;
    }

    .site-info {
        flex-wrap: wrap;
        gap: 8px;
    }

    .risk-site-name {
        min-width: 0;
        flex-basis: 100%;
        margin-bottom: 4px;
    }

    .risk-type-inline {
        font-size: 9px;
        padding: 2px 6px;
    }

    .risk-concerns li {
        font-size: 13px;
        padding: 6px 10px;
    }

    .warning-description {
        padding: 15px;
    }

    .warning-description.expanded {
        padding: 15px;
        max-height: 500px;
    }

    .expand-toggle {
        padding: 10px 14px;
        font-size: 13px;
    }

    .expand-text {
        font-size: 14px;
    }

    .expand-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .category-card {
        min-width: 250px;
        max-width: 250px;
        padding: 15px;
    }

    .sites-list {
        max-height: 150px;
    }

    .warning-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .warning-header h4 {
        font-size: 16px;
    }

    .site-info {
        gap: 6px;
    }

    .risk-site-icon {
        width: 16px;
        height: 16px;
    }

    .expand-toggle {
        padding: 8px 12px;
    }

    .warning-description.expanded {
        max-height: 400px;
    }
}

/* ===== ACCESSIBILITY & REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

    .warning-description,
    .expand-icon,
    .expand-toggle {
        transition: none;
    }

    .warning-description.expanded .risk-concerns li {
        animation: none;
    }
}