:root { --primary: #07c160; --bg: #f0f2f5; --panel-w: 360px; }
body { font-family: -apple-system, sans-serif; background: var(--bg); margin: 0; display: flex; height: 100vh; overflow: hidden; }

.panel { width: var(--panel-w); background: white; padding: 20px; box-shadow: 2px 0 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 15px; overflow-y: auto; }
.section-title { font-size: 14px; font-weight: bold; color: #666; margin-top: 10px; border-bottom: 2px solid #eee; padding-bottom: 5px; }

.control-group { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 13px; color: #444; }
input[type="text"], select, input[type="number"] { padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; }

.color-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input[type="color"] { width: 100%; height: 35px; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; padding: 0; }

.file-btn { background: #f0f2f5; color: #333; border: 1px solid #ddd; padding: 10px; border-radius: 8px; cursor: pointer; text-align: center; font-size: 13px; }

/* Custom Dropdown Styling */
.custom-dropdown {
    position: relative;
    user-select: none;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

.dropdown-selected img, .dropdown-option img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.dropdown-selected .arrow {
    margin-left: auto;
    font-size: 10px;
    color: #999;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 400px;
    padding: 10px;
}

.dropdown-options.show {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.dropdown-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    border: 1px solid transparent;
}

.dropdown-option img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #eee;
}

.dropdown-option span {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dropdown-option:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

.dropdown-option.active {
    background: #e8f5e9;
    border-color: var(--primary);
}

.dropdown-option.active span {
    color: var(--primary);
    font-weight: bold;
}

.preview-section { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; position: relative; }
#qr-canvas-container { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }

.download-group { position: absolute; bottom: 30px; display: flex; gap: 10px; }
.btn-main { background: var(--primary); color: white; border: none; padding: 12px 24px; border-radius: 8px; font-weight: bold; cursor: pointer; }
.btn-outline { background: white; color: #333; border: 1px solid #ddd; padding: 12px 24px; border-radius: 8px; cursor: pointer; }

.top-nav {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-switch select { 
    padding: 8px 12px; 
    border-radius: 6px; 
    border: 1px solid #ddd; 
    font-size: 13px; 
    background: white; 
    cursor: pointer; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#status { 
    font-size: 12px; 
    color: #888; 
    background: rgba(255,255,255,0.8); 
    padding: 7px 12px; 
    border-radius: 6px;
    pointer-events: none;
    line-height: 1.5;
}

/* Fullscreen Ad Overlay */
#ad-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: sans-serif;
}
.ad-container {
    width: 90%;
    max-width: 800px;
    height: 60vh;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}
#ad-timer {
    font-size: 1.2rem;
    margin-bottom: 15px;
}
#skip-ad-btn {
    background: white;
    color: black;
    border: none;
    padding: 10px 30px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    display: none;
}
#skip-ad-btn:disabled {
    background: #666;
    cursor: not-allowed;
}
