/* Placeholder Generator Styles */
.ph-hex-input {
    width: 80px;
    padding: 6px 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    font-family: monospace;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}
.ph-hex-input:focus { border-color: #00d4ff; }

.ph-text-input {
    flex: 1;
    padding: 6px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}
.ph-text-input:focus { border-color: #00d4ff; }

.ph-select {
    flex: 1;
    padding: 6px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid #444;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}
.ph-select option { background: #1a1a2e; color: #fff; }

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

.ph-format-group {
    display: flex;
    gap: 4px;
    flex: 1;
}
.ph-format-btn {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #444;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: #888;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.ph-format-btn.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: #00d4ff;
    color: #00d4ff;
}

.ph-preset-categories {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.ph-preset-cat {
    padding: 4px 10px;
    border: 1px solid #444;
    border-radius: 6px;
    background: none;
    color: #888;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.ph-preset-cat.active {
    color: #00d4ff;
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.ph-preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 160px;
    overflow-y: auto;
}
.ph-preset-chip {
    padding: 5px 10px;
    border: 1px solid #444;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    color: #aaa;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}
.ph-preset-chip:hover {
    border-color: #666;
    background: rgba(255,255,255,0.08);
}
.ph-preset-chip.selected {
    border-color: #7b2cbf;
    background: rgba(123, 44, 191, 0.15);
    color: #c084fc;
}

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

.ph-ratio-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.ph-ratio-chip {
    padding: 3px 8px;
    border: 1px solid #444;
    border-radius: 4px;
    background: none;
    color: #888;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.ph-ratio-chip.active {
    border-color: #00d4ff;
    color: #00d4ff;
}

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

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

.ph-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 400px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 16px;
    overflow: hidden;
}

.ph-copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 212, 255, 0.9);
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 9999;
}
.ph-copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Random generation */
.ph-rand-checks {
    display: flex;
    gap: 12px;
    margin: 8px 0;
}
.ph-rand-check {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #ccc;
}
.ph-rand-check input[type="checkbox"] {
    accent-color: #00d4ff;
}
.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: 8px;
    margin-top: 12px;
    max-height: 400px;
    overflow-y: auto;
}
.ph-thumb-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.ph-thumb-item:hover {
    border-color: #555;
}
.ph-thumb-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: rgba(0,0,0,0.2);
    padding: 4px;
}
.ph-thumb-info {
    padding: 4px 6px;
    font-size: 0.65rem;
    color: #aaa;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ph-thumb-actions {
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.ph-thumb-actions button {
    flex: 1;
    padding: 4px;
    border: none;
    background: none;
    color: #888;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.ph-thumb-actions button:hover {
    background: rgba(0,212,255,0.1);
    color: #00d4ff;
}
.ph-thumb-actions button + button {
    border-left: 1px solid rgba(255,255,255,0.08);
}

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

/* API Guide */
.ph-api-guide {
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 8px;
}
.ph-api-guide summary {
    font-size: 0.8rem;
    color: #888;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.ph-api-guide summary:hover { color: #00d4ff; }
.ph-api-guide[open] summary { color: #00d4ff; margin-bottom: 10px; }
.ph-api-guide-body {
    font-size: 0.75rem;
    color: #aaa;
    line-height: 1.6;
}
.ph-api-guide-body h4 {
    color: #ccc;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 10px 0 4px;
}
.ph-api-guide-body h4:first-child { margin-top: 0; }
.ph-api-code {
    display: block;
    background: rgba(0,0,0,0.3);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 6px 10px;
    font-family: monospace;
    font-size: 0.7rem;
    color: #ddd;
    word-break: break-all;
    margin: 4px 0;
}
.ph-api-code em {
    color: #00d4ff;
    font-style: normal;
}
.ph-api-code + .ph-api-code { margin-top: 4px; }
.ph-api-example {
    font-size: 0.7rem;
    color: #666;
    margin: 2px 0 0;
}
.ph-api-example code {
    color: #888;
    font-family: monospace;
}
.ph-api-formats {
    display: flex;
    gap: 6px;
    margin: 4px 0;
}
.ph-api-formats span {
    padding: 2px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid #444;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.7rem;
    color: #aaa;
}
.ph-api-params {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0;
}
.ph-api-params td {
    padding: 3px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.7rem;
    vertical-align: top;
}
.ph-api-params td:first-child {
    white-space: nowrap;
    width: 1%;
}
.ph-api-params td:first-child code {
    color: #00d4ff;
    font-family: monospace;
}
