:root {
    --sakura-pink: #ffb7c5;
    --sakura-white: #fff5f7;
    --sakura-deep: #ff8fa3;
    --bg-dark: #0d0d16;
    --card-bg: rgba(255, 255, 255, 0.08);
}

body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at center, #fff9fb 0%, #ffe4e9 100%);
    color: #5d4037;
    font-family: 'Noto Sans KR', sans-serif;
    min-height: 100vh;
}

.navbar {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #ff8fa3;
    padding: 1rem 0;
    box-shadow: 0 0 10px rgba(255, 92, 138, 0.2);
}

.logo {
    color: #ff5c8a;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 92, 138, 0.5);
    margin-left: 2rem;
}

.intro-card-container {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.input-section {
    flex: 1;
    background: rgba(45, 25, 30, 0.85);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 145, 164, 0.4);
    box-shadow: 0 0 20px rgba(255, 145, 164, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

.input-section h2 {
    color: #ff8fa3;
    margin-top: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #a0a0c0;
    font-weight: 600;
}

input[type="text"], textarea, select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 183, 197, 0.3);
    color: #fff;
    padding: 0.8rem;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s;
}

input[type="text"]:focus, textarea:focus {
    border-color: var(--sakura-pink);
    box-shadow: 0 0 8px var(--sakura-pink);
    outline: none;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--sakura-white), var(--sakura-pink));
    border: none;
    color: white;
    padding: 1.2rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 15px rgba(255, 0, 212, 0.4);
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: #ff8fa3;
}

.preview-section {
    flex: 1.5;
    position: sticky;
    top: 2rem;
}

.card-canvas-container {
    background: #000;
    padding: 15px;
    border-radius: 15px;
    border: 2px solid var(--sakura-deep);
}

canvas {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.tier-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.tier-item {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    transition: all 0.2s;
    text-align: center;
}

.tier-item:hover {
    background: rgba(255, 145, 164, 0.1);
    border-color: var(--sakura-white);
}

.tier-item.active {
    background: rgba(255, 145, 164, 0.3);
    border-color: #ff8fa3;
    box-shadow: 0 0 15px #ff8fa3;
    transform: scale(1.1);
}

.upload-box {
    background: rgba(255, 183, 197, 0.2);
    border: 2px dashed #ff8fa3 !important;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 1rem;
}

input[type="file"] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #fce4ec;
    padding: 5px;
}

input[type="file"]::-webkit-file-upload-button {
    background: var(--sakura-pink);
    border: 1px solid var(--sakura-deep);
    border-radius: 4px;
    color: #5d4037;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--sakura-deep);
    color: white;
}

.tier-item img {
    width: 40px;
    height: 40px;
}

.selected-characters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.char-slot {
    width: 80px;
    height: 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px dashed var(--sakura-white);
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.char-slot:hover {
    box-shadow: 0 0 10px var(--sakura-white);
}

.search-results {
    position: absolute;
    background: #2d191e;
    border: 1px solid var(--sakura-pink);
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    border-radius: 8px;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.search-results.active {
    display: block;
}

.search-item {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.search-item:hover {
    background: rgba(255, 145, 164, 0.3);
}

.search-item img {
    width: 35px;
    height: 35px;
    border-radius: 4px;
}
/* Support Button & Modal Styles */
.support-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    gap: 12px;
}

.support-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb7c5, #ff8fa3);
    border: 2px solid #fff;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 143, 163, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
}

.support-btn:hover {
    transform: scale(1.1) rotate(10deg);
    background: linear-gradient(135deg, #ff8fa3, #ff5c8a);
    box-shadow: 0 6px 20px rgba(255, 92, 138, 0.6);
}

.thanks-btn {
    border-radius: 999px;
    width: auto;
    min-width: 112px;
    padding: 0 1.1rem;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 22, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(180deg, rgba(255, 245, 247, 0.95), rgba(255, 228, 233, 0.95));
    width: 90%;
    max-width: 400px;
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid #ff8fa3;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #ff8fa3;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #ff5c8a;
}

.modal-header h3 {
    color: #ff5c8a;
    margin: 0 0 0.5rem;
    font-size: 1.8rem;
    font-weight: 800;
}

.modal-header p {
    color: #8d6e63;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.qr-container {
    background: white;
    padding: 15px;
    border-radius: 18px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.qr-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-width: 250px;
}

.modal-footer p {
    color: #ff8fa3;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cute-decoration {
    font-size: 1.2rem;
    color: #ff5c8a;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (max-width: 600px) {
    .support-wrapper {
        top: 15px;
        right: 15px;
    }
    .support-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Theme Selector Styles */
.theme-selector-group {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.theme-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.theme-btn input {
    display: none;
}

.theme-btn.pink { background: rgba(255, 183, 197, 0.1); border-color: #ffb7c5; }
.theme-btn.pink.active { background: #ffb7c5; color: #5d4037; box-shadow: 0 0 15px #ffb7c5; }

.theme-btn.green { background: rgba(175, 252, 65, 0.1); border-color: #affc41; }
.theme-btn.green.active { background: #affc41; color: #1b3022; box-shadow: 0 0 15px #affc41; }

.theme-btn.blue { background: rgba(135, 206, 235, 0.1); border-color: #87CEEB; }
.theme-btn.blue.active { background: #87CEEB; color: #0d2a35; box-shadow: 0 0 15px #87CEEB; }

.theme-btn.yellow { background: rgba(255, 215, 0, 0.1); border-color: #ffd700; }
.theme-btn.yellow.active { background: #ffd700; color: #352a0d; box-shadow: 0 0 15px #ffd700; }

.custom-upload-info {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-upload-info p {
    font-size: 0.8rem;
    color: #a0a0c0;
    margin: 0 0 10px 0;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    width: 100%;
    transition: all 0.2s;
}


.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Crop Modal Specifics */
.crop-modal-content {
    max-width: 600px !important;
}

.crop-container {
    width: 100%;
    max-height: 450px;
    background: #000;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 12px;
}

.crop-container img {
    max-width: 100%;
}

.crop-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.thanks-modal-content {
    max-width: 520px;
}

.sponsor-list {
    max-height: 340px;
    overflow-y: auto;
    padding: 0.3rem 0.15rem 0.3rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.sponsor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 143, 163, 0.35);
    box-shadow: 0 4px 14px rgba(255, 143, 163, 0.16);
}

.sponsor-name {
    font-size: 1rem;
    font-weight: 700;
    color: #7a3553;
}

.sponsor-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ad5d84;
    white-space: nowrap;
}

.sponsor-loading,
.sponsor-error,
.sponsor-empty {
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed rgba(255, 143, 163, 0.5);
    border-radius: 12px;
    padding: 1rem;
    color: #8d6e63;
    font-weight: 600;
    text-align: center;
}
