/* 
 * YouTube BGM AI Prompt Maker Pro - CSS 
 * Theme: Dark Mode with Neon Blue/Green accents (+ High Contrast UX & 2-Col Layout)
 */

.xxxxx-power-tool-wrapper.tool-youtube_bgm_maker {
    font-family: 'Inter', 'Noto Sans KR', 'Segoe UI', sans-serif;
    margin: 40px 0;
    box-sizing: border-box;
    position: relative;
}

.xxxxx-bgm-pro-container *,
.xxxxx-bgm-pro-container *::before,
.xxxxx-bgm-pro-container *::after {
    box-sizing: inherit;
}

/* Base Container */
.xxxxx-bgm-pro-container {
    background-color: #121212;
    border-radius: 16px;
    padding: 30px;
    max-width: 1300px;
    /* Expanded for 2 columns */
    margin: 0 auto;
    border: 1px solid #30363d;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 230, 118, 0.05);
    color: #f5f5f5;
}

/* Header */
.xxxxx-bgm-pro-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid #21262d;
}

.xxxxx-bgm-pro-header h3 {
    margin: 0 0 8px 0;
    font-size: 30px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.xxxxx-bgm-pro-header .neon-text {
    background: linear-gradient(90deg, #00e676 0%, #00b0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}

.xxxxx-bgm-pro-header p {
    color: #b0bec5;
    font-size: 14px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* 2-Column Layout (Desktop) */
.xxxxx-bgm-pro-layout-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    /* Important for sticky to work based on height content */
}

/* Left Grid Column */
.xxxxx-bgm-pro-options-column {
    flex: 1 1 65%;
    /* approx 65% width */
    min-width: 0;
    /* Prevents flexbox expansion bug */
}

.xxxxx-bgm-pro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.col-span-2 {
    grid-column: 1 / -1;
}

/* Right Result Column (Sticky) */
.xxxxx-bgm-pro-result-column {
    flex: 1 1 30%;
    /* approx 35% minus gap */
    min-width: 320px;
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    /* Increased offset from window top to bypass theme fixed headers */
    align-self: flex-start;
    height: max-content;
    /* Critical for flex child sticky */
    z-index: 10;
}

/* Card layout wrapper */
.xxxxx-bgm-pro-card {
    background: #1e1e1e;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.xxxxx-bgm-pro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border-color: #00e676;
}

.xxxxx-bgm-pro-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.xxxxx-bgm-pro-card-header .icon {
    font-size: 20px;
    margin-right: 10px;
    background: #2a2a2a;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.xxxxx-bgm-pro-card-header h4 {
    margin: 0;
    font-size: 16px;
    color: #f5f5f5;
    font-weight: 700;
}

/* Inputs & Form Base */
.xxxxx-bgm-select {
    width: 100%;
    background-color: #121212;
    color: #f5f5f5;
    border: 1px solid #444444;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23b0bec5%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px top 50%;
    background-size: 12px auto;
}

.xxxxx-bgm-select:focus {
    outline: none;
    border-color: #00e676;
    box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.2);
    background-color: #1a1a1a;
}

.xxxxx-bgm-select option {
    background-color: #1e1e1e;
    color: #f5f5f5;
    padding: 8px 12px;
}

/* Radio & Checks Grid */
.xxxxx-bgm-pro-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.xxxxx-bgm-pro-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.structure-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.xxxxx-radio-label,
.xxxxx-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 32px;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
    line-height: 1.5;
}

/* Overriding aggressive WordPress theme globals */
.xxxxx-bgm-pro-container label.xxxxx-radio-label span,
.xxxxx-bgm-pro-container label.xxxxx-checkbox-label span,
.xxxxx-radio-label span,
.xxxxx-checkbox-label span {
    color: #f5f5f5 !important;
}

.xxxxx-radio-label:hover span,
.xxxxx-checkbox-label:hover span {
    color: #ffffff !important;
}

.xxxxx-radio-label input,
.xxxxx-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom UI Toggles */
.xxxxx-radio-label span::before,
.xxxxx-checkbox-label span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 22px;
    height: 22px;
    border: 2px solid #555555;
    background: #121212;
    transition: all 0.2s;
}

.xxxxx-radio-label span::before {
    border-radius: 50%;
}

.xxxxx-checkbox-label span::before {
    border-radius: 6px;
}

.xxxxx-radio-label input:checked~span::before {
    border-color: #00e676;
    background: #00e676;
    box-shadow: inset 0 0 0 4px #121212, 0 0 10px rgba(0, 230, 118, 0.5);
}

.xxxxx-checkbox-label input:checked~span::before {
    background-color: #00e676;
    border-color: #00e676;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

.xxxxx-checkbox-label input:checked~span::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid #121212;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.xxxxx-radio-label input:focus~span::before,
.xxxxx-checkbox-label input:focus~span::before {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.xxxxx-checkbox-label input:checked:focus~span::before {
    box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.2), 0 0 10px rgba(0, 230, 118, 0.5);
}

/* Output Terminal Box */
.xxxxx-bgm-pro-result-area {
    background: #0d0d0d;
    border-radius: 12px;
    border: 1px solid #333333;
    overflow: hidden;
    margin-top: 0;
    /* Previously had top margin, removed for column layout */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    will-change: transform;
}

.xxxxx-bgm-pro-result-header {
    background: #1a1a1a;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333333;
}

.status-indicator {
    display: flex;
    align-items: center;
    color: #b0bec5;
    font-size: 14px;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.pulse {
    width: 10px;
    height: 10px;
    background-color: #00e676;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    box-shadow: 0 0 12px #00e676;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(0, 230, 118, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
    }
}

.xxxxx-btn-neon {
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
    border: 1px solid rgba(0, 230, 118, 0.3);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.xxxxx-btn-neon:hover {
    background: rgba(0, 230, 118, 0.2);
    border-color: #00e676;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
    color: #fff;
}

.xxxxx-btn-neon.copied {
    background: rgba(0, 255, 170, 0.15);
    color: #00ffaa;
    border-color: #00ffaa;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.4);
}

.xxxxx-bgm-pro-terminal {
    padding: 24px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 16px;
    line-height: 1.7;
    color: #00e676;
    min-height: 160px;
    word-break: break-word;
}

.cursor {
    display: inline-block;
    width: 10px;
    color: #00e676;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Enhancers & Custom Inputs */
.xxxxx-bgm-pro-enhancers {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.xxxxx-custom-input-wrap {
    width: 100%;
}

.xxxxx-bgm-input {
    width: 100%;
    background-color: #121212;
    color: #f5f5f5;
    border: 1px solid #444444;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
}

.xxxxx-bgm-input:focus {
    outline: none;
    border-color: #00e676;
    box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.2);
}

.xxxxx-hint-text {
    line-height: 1.4;
}

/* Preset Chips */
.xxxxx-preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.xxxxx-chip {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #f5f5f5;
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.xxxxx-chip:hover {
    background: #333;
    border-color: #00e676;
    color: #fff;
    transform: translateY(-1px);
}

.xxxxx-chip-random {
    background: rgba(0, 230, 118, 0.1);
    color: #00e676;
    border-color: rgba(0, 230, 118, 0.4);
    margin-left: auto;
    /* Push to right */
}

.xxxxx-chip-random:hover {
    background: rgba(0, 230, 118, 0.2);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.3);
}

/* HQ Masterpiece Toggle (iOS Style) */
.xxxxx-toggle-row {
    background: #1a1a1a;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid #333;
}

.xxxxx-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #f5f5f5;
    font-weight: 600;
    font-size: 15px;
    width: 100%;
}

.xxxxx-bgm-pro-container label.xxxxx-toggle-label span,
.xxxxx-toggle-label span {
    color: #f5f5f5 !important;
}

.xxxxx-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.xxxxx-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.xxxxx-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .3s;
    border-radius: 34px;
}

.xxxxx-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #121212;
    transition: .3s;
    border-radius: 50%;
}

.xxxxx-switch input:checked+.xxxxx-slider {
    background-color: #00e676;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

.xxxxx-switch input:focus+.xxxxx-slider {
    box-shadow: 0 0 1px #00e676;
}

.xxxxx-switch input:checked+.xxxxx-slider:before {
    transform: translateX(24px);
}

/* Mobile Media Queries (Under 992px) */
@media (max-width: 991px) {
    .xxxxx-bgm-pro-layout-cols {
        flex-direction: column;
    }

    .xxxxx-bgm-pro-options-column,
    .xxxxx-bgm-pro-result-column {
        flex: 1 1 100%;
        width: 100%;
    }

    /* Reset sticky for mobile */
    .xxxxx-bgm-pro-result-column {
        position: relative;
        top: 0;
        margin-top: 10px;
    }

    /* Floating Copy Button on Mobile */
    #bgm_pro_copy_btn {
        position: fixed;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999;
        width: 85%;
        max-width: 400px;
        justify-content: center;
        background: #00e676;
        color: #121212;
        border: none;
        padding: 16px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 230, 118, 0.4);
        border-radius: 40px;
        font-size: 16px;
    }

    #bgm_pro_copy_btn svg {
        stroke: #121212;
    }

    #bgm_pro_copy_btn.copied {
        background: #00ffaa;
        color: #121212;
        box-shadow: 0 0 30px rgba(0, 255, 170, 0.6);
    }
}