:root {
    --primary: #007AFF;
    --primary-hover: #005bb5;
    --danger: #FF3B30;
    --success: #34C759;
    --success-hover: #2eb050;
    --text-main: #1c1c1e;
    --text-muted: #8e8e93;
    --bg-body: #f2f2f7;
    --bg-container: rgba(255, 255, 255, 0.85);
    --border-color: rgba(255, 255, 255, 0.4);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    margin: 0;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.app-wrapper {
    flex: 1;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}
/* Bubble Background */
.bubble-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.08);
    animation: float 15s infinite ease-in-out alternate;
    filter: blur(40px);
}
.bubble-1 { width: 400px; height: 400px; top: -100px; left: -100px; }
.bubble-2 { width: 500px; height: 500px; bottom: -150px; right: -100px; animation-delay: -2s; background: rgba(52, 199, 89, 0.08); }
.bubble-3 { width: 300px; height: 300px; bottom: 20%; left: 20%; animation-delay: -5s; background: rgba(255, 59, 48, 0.05); }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, -50px) scale(1.1); }
}
.container {
    background: var(--bg-container);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    width: 98%;
    max-width: 1000px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    z-index: 1;
}
h1 {
    grid-column: 1 / -1;
    margin-top: 0;
    color: var(--text-main);
    margin-bottom: 0;
    font-size: 26px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    font-weight: 700;
}
.panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.preview-panel {
    position: sticky;
    top: 90px;
    align-self: start;
}
.section-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.panel-section {
    display: flex;
    flex-direction: column;
}
input[type="number"] {
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    background: transparent;
    color: var(--text-main);
    font-weight: 500;
}
.toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.input-icon {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.6);
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    padding: 0 8px;
    flex: 1;
    transition: all 0.3s;
}
.input-icon:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
    background: #fff;
}
.input-icon svg {
    color: var(--text-muted);
    margin-right: 5px;
    flex-shrink: 0;
}
.input-icon input {
    border: none;
    width: 100%;
    padding: 8px 0;
    outline: none;
    font-size: 14px;
}
.icon-toggle {
    display: block;
    cursor: pointer;
}
.icon-toggle input[type="checkbox"] {
    display: none;
}
.toggle-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #d1d1d6;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.2s;
}
.icon-toggle input[type="checkbox"]:checked + .toggle-box {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}
.toggle-box:hover {
    border-color: var(--primary);
}
input[type="file"] {
    display: none;
}
.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.4);
    border-radius: 12px;
    padding: 10px;
    min-height: 260px;
    overflow: hidden;
    border: 2px dashed #d1d1d6;
    cursor: pointer;
    transition: all 0.3s;
}
.preview-container:hover, .preview-container.dragover {
    border-color: var(--primary);
    background: rgba(0, 122, 255, 0.05);
}
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    pointer-events: none;
}
.placeholder-content p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}
canvas {
    max-width: 100%;
    max-height: 350px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3hF0kP///8HwGMMzMCxHk2cYi2EwMEg8gKxohPZgHBs1wAAAxJ4j11/jOugAAAAASUVORK5CYII=");
}
.container button:not(.ratio-btn):not(.platform-btn):not(.format-btn):not(.icon-btn) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s, transform 0.1s;
    width: 100%;
    font-family: inherit;
}
.container button:active { transform: scale(0.96); }
.btn-primary { background-color: var(--primary); color: white; box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3); }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-success { background-color: var(--success); color: white; box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3); }
.btn-success:hover { background-color: var(--success-hover); }

.action-row {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}
.action-row button { flex: 1; }
.ratio-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}
.ratio-btn {
    margin-top: 0;
    padding: 6px 0;
    font-size: 13px;
    background-color: rgba(255,255,255,0.6);
    color: var(--text-main);
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.ratio-btn:hover { border-color: var(--primary); }
.ratio-btn.active { background-color: var(--primary); color: white; border-color: var(--primary); }

.platform-grid {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.platform-btn {
    flex: 1;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.4);
    color: var(--text-muted);
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.platform-btn:hover { background-color: rgba(255,255,255,0.8); color: var(--text-main); }
.platform-btn.active { background-color: var(--primary); color: white; box-shadow: 0 4px 10px rgba(0, 122, 255, 0.2); }

.format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.format-btn {
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 500;
    background-color: rgba(255,255,255,0.6);
    color: var(--text-main);
    border: 1px solid #d1d1d6;
    border-radius: 8px;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s;
}
.format-btn:hover { border-color: var(--primary); }
.format-btn.active { background-color: var(--primary); color: white; border-color: var(--primary); }

.info-text {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
    font-weight: 500;
}

/* Standard Info Container */
@import url('/header-footer/hf.css'); /* Ensuring compatibility if needed, though linked in HTML */
.info-container {
    background: var(--bg-container);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    width: 98%;
    max-width: 1200px;
    box-sizing: border-box;
    z-index: 1;
    margin-top: 30px;
}
.info-container h2 { color: var(--text-main); margin-top: 0; margin-bottom: 15px; font-size: 22px; }
.info-container p, .info-container li { color: var(--text-main); line-height: 1.6; margin-bottom: 10px; font-size: 15px; }
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.1); margin-bottom: 10px; }
.faq-item:last-child { border-bottom: none; }
.faq-question {
    width: 100%;
    max-width: none;
    margin: 0;
    background: none;
    border: none;
    text-align: left;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    box-shadow: none !important;
    border-radius: 0;
}
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.faq-answer p { padding-bottom: 15px; color: var(--text-muted); margin: 0; }
.arrow { transition: transform 0.3s; font-size: 12px; }
.faq-item.active .arrow { transform: rotate(180deg); }

/* Mobile Responsiveness */
@media (min-width: 769px) {
    .info-container { width: 80%; }
}
@media (max-width: 768px) {
    .container { grid-template-columns: 1fr; }
    h1 { order: -2; }
    .preview-panel { position: static; order: -1; }
    .ratio-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
    h1 { font-size: 20px; }
    .ratio-grid { grid-template-columns: repeat(3, 1fr); }
    .toolbar { flex-wrap: wrap; }
}
