* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    line-height: 1.6;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-link {
    display: block;
    margin-bottom: 15px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.header-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

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

.logo-link:hover .header-logo {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    animation: floatHover 2s ease-in-out infinite;
}

@keyframes floatHover {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.2;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    line-height: 1.4;
}

.section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
}

.upload-area.dragover {
    border-color: #764ba2;
    background: #e8ebff;
    transform: scale(1.02);
}

.upload-content svg {
    color: #667eea;
    margin-bottom: 20px;
}

.upload-content p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.6;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.2em;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 10px;
    margin-bottom: 10px;
}

.file-item-info {
    flex: 1;
}

.file-item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-item-size {
    color: #666;
    font-size: 0.9em;
}

.link-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 15px;
}

.link-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.link-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.link-container input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    width: 100%;
    line-height: 1.5;
}

.link-container button {
    white-space: nowrap;
}

.info-text {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
    line-height: 1.6;
}

.warning-text {
    color: #ff6b6b;
    font-size: 0.9em;
    margin-top: 10px;
    font-weight: 600;
    line-height: 1.6;
}

.status-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 15px;
}

.status-info {
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.status-text {
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.5;
}

.transfer-speed {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.file-info {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.receive-content {
    text-align: center;
    padding: 40px 20px;
}

.receive-content svg {
    color: #667eea;
    margin-bottom: 20px;
}

.receive-content h2 {
    color: #333;
    margin-bottom: 15px;
}

.error-section {
    margin-top: 20px;
    padding: 20px;
    background: #ffe0e0;
    border-radius: 15px;
    border: 2px solid #ff6b6b;
}

.error-text {
    color: #d32f2f;
    font-weight: 600;
    text-align: center;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.85em;
    line-height: 1.4;
}

.hidden {
    display: none !important;
}

/* 파일 제거 버튼 */
.btn-remove {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #ff5252;
    transform: scale(1.1);
}

/* 도움말 섹션 */
.help-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.help-toggle {
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1em;
    color: #333;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
}

.help-toggle:hover {
    background: #e0e0e0;
}

.help-toggle span {
    margin-right: 8px;
    font-size: 1.2em;
}

/* 모달 스타일 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2em;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 25px;
}

.help-content {
    padding: 0;
    background: transparent;
    border-radius: 0;
    text-align: left;
}

.help-content h3 {
    color: #667eea;
    margin-bottom: 15px;
    margin-top: 0;
}

.help-content h4 {
    color: #333;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.help-item {
    margin-bottom: 20px;
}

.help-item p {
    color: #666;
    line-height: 1.8;
    margin: 0 0 10px 0;
}

.help-list {
    list-style: none;
    padding-left: 0;
    color: #666;
    line-height: 1.8;
}

.help-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.help-list li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

.help-list li strong {
    color: #333;
}

/* QR 코드 섹션 */
.qr-section {
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.qr-section canvas {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 모바일 반응형 디자인 */
@media (min-width: 481px) {
    .container {
        padding: 30px;
    }
    
    .link-container {
        flex-direction: row;
    }
    
    .upload-area {
        padding: 40px;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 40px;
    }
    
    body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 0.95em;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95em;
        width: 100%;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 1.1em;
    }
    
    .upload-content svg {
        width: 48px;
        height: 48px;
    }
    
    .upload-content p {
        font-size: 1em;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-item-name {
        font-size: 0.9em;
        word-break: break-word;
    }
    
    .help-content {
        padding: 0;
        font-size: 0.95em;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.3em;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.5em;
    }
    
    .help-content h3 {
        font-size: 1.1em;
    }
    
    .help-content h4 {
        font-size: 1em;
    }
    
    .header-logo {
        width: 60px;
        height: 60px;
        animation: floatMobile 3s ease-in-out infinite;
    }
    
    @keyframes floatMobile {
        0%, 100% {
            transform: translateY(0px);
        }
        50% {
            transform: translateY(-8px);
        }
    }
    
    .logo-link {
        margin-bottom: 10px;
    }
    
    .link-section {
        padding: 15px;
    }
    
    .status-section {
        padding: 15px;
    }
    
    .receive-content {
        padding: 30px 15px;
    }
    
    .receive-content svg {
        width: 48px;
        height: 48px;
    }
    
    .receive-content h2 {
        font-size: 1.3em;
    }
    
    footer {
        font-size: 0.85em;
        padding-top: 15px;
        margin-top: 20px;
    }
    
    /* 카카오 애드핏 모바일 */
    .kakao_ad_area {
        max-width: 100%;
        overflow: hidden;
    }
}

/* 카카오 애드핏 컨테이너 스타일 */
.kakao-ad-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
}

@media (max-width: 480px) {
    .kakao-ad-container {
        margin: 20px 0;
        padding: 15px;
    }
}

