html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

.ftrp-canvas-section {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    color: #333;
    background: transparent;
    cursor: grab;
}

body.hovering .ftrp-canvas-section {
    cursor: pointer;
}

.ftrp-canvas-card {
    position: relative;
    width: 100%;
    height: 600px;
    background: transparent;
    border: 2px solid #999;
    border-radius: 4px;
    overflow: hidden;
    box-sizing: border-box;
    overscroll-behavior: none;
    touch-action: none;
}

#ftrp-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    transition: filter 0.4s ease;
}

#ftrp-canvas.ftrp-blurred {
    filter: blur(8px) brightness(0.8);
}

.ftrp-profile-ov {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.ftrp-profile-ov.active {
    opacity: 1;
    pointer-events: all;
}

.ftrp-profile-card {
    width: min(480px, calc(100% - 32px));
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    position: relative;
}

#ftrp-p-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #f5f5f5;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    z-index: 101;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1;
}

#ftrp-p-close:hover {
    color: #333;
    background: #e8e8e8;
}

.ftrp-p-head {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.ftrp-p-avatar {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px #ddd;
}

.ftrp-p-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ftrp-p-info h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #222;
    letter-spacing: 0;
}

.ftrp-p-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ftrp-p-st {
    min-width: 80px;
}

.ftrp-p-sv {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #555;
}

.ftrp-p-sl {
    margin-top: 0.2rem;
    color: #999;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ftrp-p-photos-title {
    margin-bottom: 0.8rem;
    color: #999;
    letter-spacing: 0.05em;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.ftrp-p-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.ftrp-p-preview-image {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #eee;
    aspect-ratio: 1;
}

.ftrp-p-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ftrp-p-empty {
    color: #999;
    font-size: 0.9rem;
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem 0;
}

.ftrp-p-profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #333;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: background 0.2s;
    border: none;
    box-sizing: border-box;
}

.ftrp-p-profile-btn:hover {
    background: #555;
}

.ftrp-search-wrap {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    width: 220px;
}

.ftrp-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: rgba(255,255,255,0.95);
    font-size: 13px;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    color: #333;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ftrp-search-input:focus {
    border-color: #888;
}

.ftrp-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.ftrp-search-results.active {
    display: block;
}

.ftrp-search-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}

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

.ftrp-search-item:hover {
    background: #f5f5f5;
}

.ftrp-search-item-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ftrp-search-item-info {
    flex: 1;
    min-width: 0;
}

.ftrp-search-item-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ftrp-search-item-fotos {
    font-size: 11px;
    color: #999;
}

.ftrp-no-data {
    padding: 4rem 2rem;
    text-align: center;
    color: #999;
    font-size: 1rem;
}

@media (max-width: 680px) {
    .ftrp-canvas-card {
        height: 400px;
    }

    .ftrp-p-head {
        justify-content: center;
        text-align: center;
    }

    .ftrp-p-stats {
        justify-content: center;
    }

    .ftrp-p-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
