/* Placeholder Generator Styles */
.ph-hex-input {
    width: 80px;
    padding: 8px 10px;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fafafa;
    font-size: 0.8rem;
    font-family: 'SF Mono', 'Menlo', monospace;
    text-align: center;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ph-hex-input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.ph-text-input {
    flex: 1;
    padding: 8px 12px;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fafafa;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.ph-text-input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.ph-select {
    flex: 1;
    padding: 8px 12px;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fafafa;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}
.ph-select option { background: #27272a; color: #fafafa; }

.ph-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}
.ph-actions .bulk-btn {
    font-size: 0.75rem;
    padding: 8px 12px;
}

.ph-format-group {
    display: flex;
    gap: 4px;
    flex: 1;
}
.ph-format-btn {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #18181b;
    color: #71717a;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.ph-format-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: #a1a1aa;
}
.ph-format-btn.active {
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    border-color: transparent;
    color: #fff;
}

.ph-preset-categories {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.ph-preset-cat {
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 980px;
    background: #18181b;
    color: #71717a;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}
.ph-preset-cat:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: #a1a1aa;
}
.ph-preset-cat.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
}

.ph-preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 160px;
    overflow-y: auto;
}
.ph-preset-chip {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: #18181b;
    color: #a1a1aa;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
    font-weight: 500;
}
.ph-preset-chip:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: #27272a;
}
.ph-preset-chip.selected {
    border-color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
}

.ph-batch-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.ph-batch-bar span {
    font-size: 0.8rem;
    color: #a1a1aa;
    flex: 1;
    font-weight: 500;
}

.ph-ratio-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.ph-ratio-chip {
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: #18181b;
    color: #71717a;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}
.ph-ratio-chip:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: #a1a1aa;
}
.ph-ratio-chip.active {
    border-color: #a78bfa;
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
}
.ph-ratio-custom {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 2px;
}
.ph-ratio-input {
    width: 36px;
    padding: 4px 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: #27272a;
    color: #fafafa;
    font-size: 0.7rem;
    text-align: center;
    font-family: inherit;
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}
.ph-ratio-input::-webkit-inner-spin-button,
.ph-ratio-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ph-ratio-input:focus {
    outline: none;
    border-color: #a78bfa;
}
.ph-ratio-input.active {
    border-color: #a78bfa;
    color: #a78bfa;
}

.ph-retina-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
    margin-top: 10px;
}
.ph-retina-options {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    padding-left: 48px;
}
.ph-retina-options label {
    font-size: 0.8rem;
    color: #a1a1aa;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
.ph-retina-options input[type="checkbox"] {
    accent-color: #a78bfa;
}

#ph-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.ph-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 400px;
    background: #18181b;
    border-radius: 14px;
    padding: 16px;
    overflow: hidden;
}

.ph-copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #18181b;
    color: #fafafa;
    padding: 10px 24px;
    border-radius: 980px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 9999;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.ph-copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Random generation */
.ph-rand-checks {
    display: flex;
    gap: 14px;
    margin: 10px 0;
}
.ph-rand-check {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #fafafa;
    font-weight: 500;
}
.ph-rand-check input[type="checkbox"] {
    accent-color: #a78bfa;
}
.ph-rand-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}
.ph-rand-range .resize-input {
    flex: 1;
}

/* Thumbnail grid */
.ph-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 14px;
    max-height: 400px;
    overflow-y: auto;
}
.ph-thumb-item {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ph-thumb-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.ph-thumb-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #0c0c0f;
    padding: 4px;
}
.ph-thumb-info {
    padding: 6px 8px;
    font-size: 0.7rem;
    color: #a1a1aa;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}
.ph-thumb-actions {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.ph-thumb-actions button {
    flex: 1;
    padding: 6px;
    border: none;
    background: none;
    color: #71717a;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 500;
}
.ph-thumb-actions button:hover {
    background: rgba(167, 139, 250, 0.1);
    color: #a78bfa;
}
.ph-thumb-actions button + button {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* Random bulk actions */
.ph-rand-bulk {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}
.ph-rand-bulk .bulk-btn {
    font-size: 0.75rem;
    padding: 8px 12px;
}

/* API Guide */
.ph-api-guide {
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
}
.ph-api-guide summary {
    font-size: 0.8rem;
    color: #71717a;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    font-weight: 500;
}
.ph-api-guide summary:hover { color: #a78bfa; }
.ph-api-guide[open] summary { color: #a78bfa; margin-bottom: 12px; }
.ph-api-guide-body {
    font-size: 0.8rem;
    color: #a1a1aa;
    line-height: 1.6;
}
.ph-api-guide-body h4 {
    color: #fafafa;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 12px 0 6px;
    font-weight: 600;
}
.ph-api-guide-body h4:first-child { margin-top: 0; }
.ph-api-code {
    display: block;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 0.75rem;
    color: #fafafa;
    word-break: break-all;
    margin: 4px 0;
}
.ph-api-code em {
    color: #a78bfa;
    font-style: normal;
}
.ph-api-code + .ph-api-code { margin-top: 4px; }
.ph-api-example {
    font-size: 0.75rem;
    color: #71717a;
    margin: 2px 0 0;
}
.ph-api-example code {
    color: #a1a1aa;
    font-family: 'SF Mono', 'Menlo', monospace;
}
.ph-api-formats {
    display: flex;
    gap: 6px;
    margin: 6px 0;
}
.ph-api-formats span {
    padding: 3px 10px;
    background: #27272a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 0.75rem;
    color: #a1a1aa;
    font-weight: 500;
}
.ph-api-params {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
}
.ph-api-params td {
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    vertical-align: top;
    color: #a1a1aa;
}
.ph-api-params td:first-child {
    white-space: nowrap;
    width: 1%;
}
.ph-api-params td:first-child code {
    color: #a78bfa;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-weight: 600;
}