/* STREAMING_CHUNK:Importing fonts and setting up CSS variables... */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Comic+Neue:wght@400;700&display=swap');

#comicstrip-app-wrapper {
--primary: #f59e0b;
--primary-hover: #d97706;
--action: #3b82f6;
--action-hover: #2563eb;
--surface: #ffffff;
--bg: #fdfbf7;
--text: #1f2937;
--border: #e5e7eb;

/* Force full viewport width ignoring WP theme boundaries */
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;

font-family: 'Segoe UI', system-ui, sans-serif;
background-color: var(--bg);
background-image: radial-gradient(#e5e7eb 2px, transparent 2px);
background-size: 20px 20px;

color: var(--text);
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
box-sizing: border-box;
}





#comicstrip-app-wrapper * {
box-sizing: border-box;
}

/* STREAMING_CHUNK:Styling typography and main structural elements... */
#comicstrip-app-wrapper h1 {
margin-bottom: 0.5rem;
color: #1f2937;
font-family: 'Bangers', cursive;
font-size: 3rem;
letter-spacing: 2px;
text-shadow: 2px 2px 0px #f59e0b, 4px 4px 0px #000;
text-align: center;
}

#comicstrip-app-wrapper p {
color: #4b5563;
margin-top: 0;
margin-bottom: 2rem;
text-align: center;
font-weight: 500;
max-width: 1400px;
width: 100%;
}

.main-container {
display: flex;
flex-direction: column;
gap: 20px;
max-width: 98%;
width: 100%;
background: var(--surface);
padding: 20px;
border-radius: 12px;
}

.comic-pane {
flex: 1.2;
width: 100%;
min-width: 0;
}

.settings-pane, .expression-pane {
flex: 1;
width: 100%;
max-width: 600px;
margin: 0 auto;
display: flex;
flex-direction: column;
}

/* STREAMING_CHUNK:Configuring responsive layouts... */
@media (min-width: 1200px) {
.main-container {
flex-direction: row;
align-items: flex-start;
}
.settings-pane {
max-width: 380px;
}
.expression-pane {
max-width: 480px;
}
}

.controls {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
padding-bottom: 20px;
border-bottom: 2px dashed var(--border);
}

/* STREAMING_CHUNK:Styling buttons and user inputs... */
#comicstrip-app-wrapper button {
padding: 10px 20px;
border: 3px solid #1f2937;
border-radius: 8px;
font-weight: 800;
font-size: 1rem;
cursor: pointer;
transition: all 0.2s;
text-transform: uppercase;
font-family: 'Comic Neue', Arial, sans-serif;
box-shadow: 4px 4px 0px #1f2937;
}

#comicstrip-app-wrapper button:active {
transform: translate(2px, 2px);
box-shadow: 2px 2px 0px #1f2937;
}

.btn-primary {
background-color: var(--primary);
color: #1f2937;
}

.btn-primary:hover {
background-color: var(--primary-hover);
}

.btn-action {
background-color: var(--action);
color: white;
}

.btn-action:hover {
background-color: var(--action-hover);
}

.btn-export {
background-color: #ff9933;
color: white;
}

.btn-export:hover {
background-color: #e67e22;
}

select.btn-action {
border-radius: 10px;
padding: 10px;
appearance: none;
-webkit-appearance: none;
padding-right: 30px;
background-image: url("data:image/svg+xml;utf8,");
background-repeat: no-repeat;
background-position: right 10px center;
text-align: center;
border: 3px solid #1f2937;
box-shadow: 4px 4px 0px #1f2937;
color: white;
}

select.btn-action option {
background-color: var(--surface);
color: var(--text);
font-family: 'Segoe UI', system-ui, sans-serif;
font-weight: bold;
}

/* STREAMING_CHUNK:Styling comic rendering components... */
#comic-container {
width: 100%;
overflow-x: auto;
display: flex;
justify-content: center;
padding: 10px 0;
}

#comic-svg {
max-width: 100%;
height: auto;
border-radius: 4px;
}

.comic-text {
width: 100%;
height: 100%;
border: none;
background: transparent;
resize: none;
text-align: center;
font-family: 'Comic Neue', Arial, sans-serif;
font-size: 16px;
font-weight: bold;
color: #1f2937;
overflow: hidden;
outline: none;
line-height: 1.2;
}

.comic-text::placeholder {
color: rgba(31, 41, 55, 0.3);
}

.author-text {
width: 100%;
height: 100%;
border: none;
background: transparent;
font-family: 'Comic Neue', Arial, sans-serif;
font-size: 16px;
font-weight: bold;
color: #6b7280;
outline: none;
}

.author-text::placeholder {
color: rgba(107, 114, 128, 0.5);
}

.hidden-canvas {
display: none;
}

/* STREAMING_CHUNK:Adding WordPress specific Modal and Loader styles... /
/ Modal Styles for "My Comics" */
.comicstrip-modal {
display: none;
position: fixed;
z-index: 99999;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.7);
}

.comicstrip-modal-content {
background-color: #fefefe;
margin: 10% auto;
padding: 20px;
border: 4px solid #1f2937;
border-radius: 12px;
width: 80%;
max-width: 800px;
box-shadow: 8px 8px 0px #1f2937;
font-family: 'Segoe UI', system-ui, sans-serif;
}

.comicstrip-close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
cursor: pointer;
}

.comicstrip-close:hover,
.comicstrip-close:focus {
color: #000;
text-decoration: none;
}

.comic-list-item {
border-bottom: 2px dashed #e5e7eb;
padding: 15px 0;
display: flex;
justify-content: space-between;
align-items: center;
}

.comic-list-item h4 {
margin: 0 0 5px 0;
color: #1f2937;
}

.comic-list-item span {
font-size: 0.85em;
color: #6b7280;
}

.badge {
padding: 3px 8px;
border-radius: 12px;
font-size: 0.75em;
font-weight: bold;
color: white;
margin-left: 10px;
}
.badge.private { background-color: #3b82f6; }
.badge.publish { background-color: #10b981; }

/* Loader Styles */
#comicstrip-loader {
position: fixed;
top: 0; left: 0; width: 100%; height: 100%;
background: rgba(255,255,255,0.9);
z-index: 100000;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-family: 'Bangers', cursive;
font-size: 2rem;
color: #1f2937;
}

.spinner {
width: 50px;
height: 50px;
border: 6px solid #e5e7eb;
border-top: 6px solid #f59e0b;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 15px;
}


@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}