@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary: #47b4eb;
    --primary-light: #e0f2fe;
    --background: #fafaf9;
    --text-main: #1c1917;
    --text-muted: #78716c;
    --white: #ffffff;
    --accent: #fce7f3;

    /* Layout */
    --max-width: 450px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Platform Colors */
    --line: #06C755;
    --insta: #E4405F;
    --discord: #5865F2;
    --telegram: #26A5E4;
    --x-black: #000000;
    --gmail: #EA4335;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f1f5f9;
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

#app {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    background-color: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.03);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Common Components */
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px 0 rgba(71, 180, 235, 0.39);
}

.btn-primary:active {
    transform: scale(0.95);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* --- Detailed Component Styles --- */

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: rgba(250, 250, 249, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    position: sticky;
    top: 0;
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.icon-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Profile Section */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 30px;
    text-align: center;
}

.profile-img-container {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    margin-bottom: 20px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--background);
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-main);
}

.copy-msg {
    display: none;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 8px;
    font-weight: 500;
    animation: fadeIn 0.3s ease-out;
}

.copy-msg.show {
    display: block;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0 20px 20px;
    width: 100%;
    height: auto;
}

.product-card {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary-light);
}

.product-img-box {
    width: 100%;
    aspect-ratio: 1 / 1.1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--white);
    display: flex;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.empty-img {
    width: 100%;
    height: 100%;
}

.gradient-1 {
    background: linear-gradient(135deg, #a5f3fc, #e0f2fe);
}

.gradient-2 {
    background: linear-gradient(135deg, #fce7f3, #fae8ff);
}

.product-info h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: space-around;
    padding: 40px 20px 80px;
    width: 100%;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.social-icon-box {
    width: 64px;
    height: 64px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.social-icon-box .material-symbols-outlined {
    font-size: 32px;
}

.social-item span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.social-icon-box:hover {
    transform: scale(1.1);
    background-color: var(--primary);
    color: var(--white);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    /* 중앙 배치로 변경 (드래그 지원) */
    z-index: 1000;
    backdrop-filter: blur(8px);
    /* 블러 효과 강화 */
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    /* 창 스타일을 위해 약간 좁게 조정 */
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    user-select: none;
    /* 드래그 중 텍스트 선택 방지 */
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    cursor: move;
    /* 드래그 가능 아이콘 */
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
}

.copy-link-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--white);
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.copy-link-section input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0 8px;
}

#url-copy-btn {
    background: var(--primary);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 10px;
    margin-bottom: 20px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.share-option:active {
    transform: scale(0.9);
}

.share-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-icon .material-symbols-outlined {
    font-size: 32px;
    /* 기호 크기 확대 */
}

.share-option span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Icon Backgrounds */
.bg-line {
    background-color: var(--line);
}

.bg-insta {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.bg-discord {
    background-color: var(--discord);
}

.bg-telegram {
    background-color: var(--telegram);
}

.bg-x {
    background-color: var(--x-black);
}

.bg-gmail {
    background-color: var(--gmail);
}