/* Keybin Product API Fetcher - Purple Theme */
:root {
    --paf-primary: #6C5CE7;
    --paf-primary-dark: #5A4BD1;
    --paf-primary-light: #A29BFE;
    --paf-bg: #F8F9FA;
    --paf-white: #FFFFFF;
    --paf-text: #2D3436;
    --paf-text-light: #636E72;
    --paf-border: #E9ECEF;
    --paf-success: #00B894;
    --paf-danger: #E17055;
    --paf-warning: #FDCB6E;
    --paf-radius: 12px;
    --paf-shadow: 0 2px 12px rgba(108, 92, 231, 0.08);
    --paf-shadow-hover: 0 4px 20px rgba(108, 92, 231, 0.15);
}

/* Wrapper */
.paf-wrapper {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--paf-text);
}

/* Search Card */
.paf-search-card {
    background: linear-gradient(135deg, var(--paf-primary), var(--paf-primary-dark));
    border-radius: var(--paf-radius);
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: var(--paf-shadow);
}

.paf-search-header h2 {
    color: var(--paf-white);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.paf-search-header p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px 0;
    font-size: 15px;
}

.paf-search-form {
    display: flex;
    gap: 12px;
}

.paf-search-form input[type="text"] {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--paf-text);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin: 0;
}

.paf-search-form input[type="text"]:focus {
    border-color: var(--paf-white);
}

.paf-search-form input[type="text"]::placeholder {
    color: var(--paf-text-light);
}

.paf-search-form button {
    padding: 14px 28px;
    background: var(--paf-white);
    color: var(--paf-primary);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.paf-search-form button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Loading spinner */
.paf-loading {
    text-align: center;
    padding: 40px;
    color: var(--paf-primary);
    font-size: 16px;
}

/* Product Card */
.paf-product {
    animation: pafFadeIn 0.4s ease;
    padding: 0 16px;
}

@keyframes pafFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Product Header */
.paf-product-header {
    background: var(--paf-white);
    border-radius: var(--paf-radius);
    box-shadow: var(--paf-shadow);
    margin-bottom: 20px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.paf-product-header .paf-header-img {
    width: 150px;
    min-width: 150px;
    border-radius: 8px;
    overflow: hidden;
}

.paf-product-header .paf-header-img img {
    width: 100%;
    height: auto;
    display: block;
}

.paf-product-header .paf-header-info {
    flex: 1;
}

.paf-product-header h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--paf-text);
}

/* Badges */
.paf-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.paf-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.paf-badge-type {
    background: #EDE7F6;
    color: var(--paf-primary);
}

.paf-badge-released {
    background: #E8F5E9;
    color: #2E7D32;
}

.paf-badge-unreleased {
    background: #FFF3E0;
    color: #E65100;
}

.paf-badge-platform {
    background: #E3F2FD;
    color: #1565C0;
}

.paf-badge-region {
    background: #F3E5F5;
    color: #7B1FA2;
}

/* Gallery */
.paf-gallery {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.paf-gallery-item {
    border-radius: var(--paf-radius);
    overflow: hidden;
    box-shadow: var(--paf-shadow);
    flex: 1;
    min-width: 0;
}

.paf-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Cards */
.paf-card {
    background: var(--paf-white);
    border-radius: var(--paf-radius);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--paf-shadow);
}

.paf-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--paf-text);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--paf-border);
}

.paf-card-restrictions h3 {
    color: var(--paf-danger);
}

/* Description */
.paf-description {
    line-height: 1.7;
    color: var(--paf-text-light);
}

/* Details Grid */
.paf-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.paf-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.paf-detail-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--paf-text-light);
}

.paf-detail-value {
    font-size: 15px;
    color: var(--paf-text);
    word-break: break-word;
}

/* Video Link */
.paf-video-link {
    color: var(--paf-primary);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.paf-video-link:hover {
    text-decoration: underline;
}

/* Tags */
.paf-tag-group {
    margin-bottom: 12px;
}

.paf-tag-group:last-child {
    margin-bottom: 0;
}

.paf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.paf-tag {
    display: inline-block;
    padding: 5px 14px;
    background: #EDE7F6;
    color: var(--paf-primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.paf-tag-genre {
    background: #E8EAF6;
    color: #283593;
}

.paf-tag-allowed {
    background: #E8F5E9;
    color: #2E7D32;
}

.paf-tag-forbidden {
    background: #FFEBEE;
    color: #C62828;
}

/* Lists */
.paf-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.paf-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--paf-border);
    color: var(--paf-text-light);
}

.paf-list li:last-child {
    border-bottom: none;
}

.paf-list li::before {
    content: "\2022";
    color: var(--paf-primary);
    font-weight: bold;
    margin-right: 10px;
}

/* Notice */
.paf-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 12px 0;
}

.paf-notice-warning {
    background: #FFF8E1;
    border-left: 4px solid var(--paf-warning);
    color: #795548;
}

/* Country lists */
.paf-country-list {
    margin-top: 14px;
}

/* Table */
.paf-table-wrap {
    overflow-x: auto;
}

.paf-listings-table {
    width: 100%;
    border-collapse: collapse;
}

.paf-listings-table th {
    background: var(--paf-primary);
    color: var(--paf-white);
    padding: 12px 14px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paf-listings-table th:first-child {
    border-radius: 8px 0 0 0;
}

.paf-listings-table th:last-child {
    border-radius: 0 8px 0 0;
}

.paf-listings-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--paf-border);
    vertical-align: top;
    font-size: 14px;
}

.paf-listings-table tbody tr:hover {
    background: #F8F7FF;
}

.paf-listings-table tbody tr:last-child td {
    border-bottom: none;
}

.paf-listings-table small {
    color: var(--paf-text-light);
    font-size: 12px;
}

.paf-rating {
    color: var(--paf-primary);
    font-weight: 700;
}

.paf-price {
    color: var(--paf-success);
    font-size: 15px;
}

/* Error state */
.paf-error {
    background: #FFEBEE;
    color: #C62828;
    padding: 16px 20px;
    border-radius: var(--paf-radius);
    text-align: center;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 600px) {
    .paf-product {
        padding: 0 8px;
    }

    .paf-search-card {
        padding: 24px;
    }

    .paf-search-form {
        flex-direction: column;
    }

    .paf-search-form button {
        width: 100%;
    }

    .paf-search-header h2 {
        font-size: 22px;
    }

    .paf-product-header {
        padding: 18px 20px;
    }

    .paf-gallery {
        gap: 8px;
    }

    .paf-gallery-item {
        height: 100px;
    }

    .paf-details-grid {
        grid-template-columns: 1fr;
    }

    .paf-card {
        padding: 18px 20px;
    }

    .paf-product-title {
        padding: 18px 20px;
    }

    .paf-product-title h2 {
        font-size: 20px;
    }
}
