* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 600px;
    width: 100%;
}

.header-section {
    text-align: center;
    margin-bottom: 30px;
}

.character-img {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

h1 {
    text-align: center;
    color: #333;
    margin: 0;
    font-size: 2em;
}

.input-section {
    margin-bottom: 30px;
}

.ad-section {
    margin: 18px 0 26px;
}

.ad-label {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.ad-slot {
    width: 100%;
    min-height: 90px;
    border: 1px dashed #cfd8dc;
    border-radius: 10px;
    background: #fafcff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    color: #607d8b;
    position: relative;
}

.ad-slot p {
    font-size: 13px;
    line-height: 1.4;
}

.ad-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    color: #607d8b;
    background: #fafcff;
    border-radius: 10px;
    padding: 12px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: 600;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.char-counter {
    text-align: right;
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.char-counter.warning {
    color: #ff9800;
    font-weight: 600;
}

.char-counter.error {
    color: #f44336;
    font-weight: 600;
}

.size-control {
    margin: 20px 0;
}

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.output-section {
    text-align: center;
}

#qrcode {
    display: inline-block;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    min-height: 100px;
}

#qrcode canvas {
    display: block !important;
    margin: 0 auto;
}

#qrcode img {
    display: none !important;
}

#downloadBtn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    margin-top: 20px;
}

#downloadBtn:hover {
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4);
}

.trust-section {
    margin-top: 26px;
    padding: 18px;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    background: #fafbff;
}

.trust-section h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #334155;
}

.trust-section p {
    color: #475569;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.usecase-section {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    background: #ffffff;
}

.usecase-section h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #334155;
}

.usecase-section p {
    color: #475569;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.usecase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.usecase-card {
    display: block;
    border: 1px solid #dbe3f0;
    border-radius: 10px;
    padding: 14px;
    text-decoration: none;
    background: #f8faff;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.usecase-card h3 {
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 8px;
}

.usecase-card p {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0;
}

.usecase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
    border-color: #a5b4fc;
}

.page-shell h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #1e293b;
}

.page-shell h3 {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #334155;
}

.page-shell ul {
    padding-left: 20px;
}

.cta-link {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 600;
}

.cta-link:hover {
    filter: brightness(1.05);
}

.site-footer {
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: center;
}

.site-footer a {
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.92rem;
}

.site-footer a:hover {
    text-decoration: underline;
}

.page-shell {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    padding: 28px;
}

.page-shell h1 {
    font-size: 1.8rem;
    margin-bottom: 18px;
}

.page-shell p,
.page-shell li {
    line-height: 1.8;
    color: #334155;
}

.page-shell section {
    margin-bottom: 18px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .ad-slot {
        min-height: 80px;
    }

    .page-shell {
        padding: 20px;
    }
}
