/*--------------------------------------------------------------
# YT Embed Code Generator Styles (Light Theme)
--------------------------------------------------------------*/
:root {
    --ytec-red: #FF0000;
    --ytec-background: #F4F4F5;    /* Light grey page background */
    --ytec-card-bg: #FFFFFF;     /* White for the main card */
    --ytec-input-bg: #FAFAFA;     /* Very light grey for inputs */
    --ytec-border: #E4E4E7;        /* Subtle light border */
    --ytec-text-dark: #27272A;      /* Dark grey for text */
    --ytec-text-light: #71717A;     /* Muted grey for labels/descriptions */
}

/* Apply page background if needed, otherwise it's contained in the wrapper */
body {
    background-color: var(--ytec-background);
}

.ytec-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Arial", sans-serif;
    background-color: var(--ytec-card-bg);
    border: 1px solid var(--ytec-border);
    color: var(--ytec-text-dark);
    border-radius: 12px;
    padding: 2rem;
    max-width: 700px;
    margin: 2rem auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ytec-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ytec-header .fa-video {
    font-size: 1.75rem;
    color: var(--ytec-red);
}

.ytec-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.ytec-group { margin-bottom: 1.25rem; }
.ytec-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--ytec-text-light); }
.ytec-group label .fa-code { margin-right: 8px; }

.ytec-options { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

#ytec-url-input, #ytec-width-input, #ytec-height-input {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--ytec-input-bg);
    border: 1px solid var(--ytec-border);
    color: var(--ytec-text-dark);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s;
}
#ytec-url-input:focus, #ytec-width-input:focus, #ytec-height-input:focus {
    outline: none;
    border-color: var(--ytec-red);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2);
}

#ytec-output-area { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--ytec-border); }

.ytec-code-box { position: relative; }
#ytec-code-output {
    width: 100%;
    padding: 1rem;
    background-color: #2D2D2D; /* Keep code block dark for contrast */
    border: 1px solid var(--ytec-border);
    color: #F1F1F1;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
}

#ytec-copy-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: #444; border: 1px solid #555; color: #FFF;
    width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
}
#ytec-copy-btn:hover { background-color: var(--ytec-red); }

.ytec-preview-box {
    background-color: #000;
    border: 1px solid var(--ytec-border);
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ytec-preview-box p { color: var(--ytec-text-light); }
.ytec-preview-box iframe { width: 100%; height: 100%; border: none; }

/* Toggle Switch */
.ytec-toggle-group { text-align: center; }
.ytec-switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.ytec-switch input { opacity: 0; width: 0; height: 0; }
.ytec-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #CCC; border-radius: 28px; transition: .4s; }
.ytec-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; border-radius: 50%; transition: .4s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
input:checked + .ytec-slider { background-color: var(--ytec-red); }
input:checked + .ytec-slider:before { transform: translateX(22px); }

@media (max-width: 600px) {
    .ytec-options { grid-template-columns: 1fr; }
}