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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 0.95em;
}

main {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.download-section {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#videoUrl {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#videoUrl:focus {
    outline: none;
    border-color: #667eea;
}

#downloadBtn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 120px;
}

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

#downloadBtn:active {
    transform: translateY(0);
}

#downloadBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.options {
    margin-bottom: 20px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.result-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.video-info {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.video-info img {
    max-width: 200px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.video-info h3 {
    color: #333;
    margin-bottom: 5px;
}

.video-info p {
    color: #666;
    font-size: 14px;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn {
    display: inline-block;
    padding: 12px 20px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    transition: background 0.3s;
    font-weight: 500;
}

.download-btn:hover {
    background: #218838;
}

.download-btn.audio {
    background: #17a2b8;
}

.download-btn.audio:hover {
    background: #138496;
}

.error-message {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    margin-top: 15px;
}

.info-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.info-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.info-section ol,
.info-section ul {
    margin-left: 20px;
    color: #555;
}

.info-section li {
    margin-bottom: 8px;
}

.features {
    list-style: none;
    margin-left: 0;
}

.features li {
    padding-left: 0;
}

/* 광고 영역 스타일 */
.ad-container {
    margin: 20px 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-top {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.ad-middle {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 30px 0;
}

.ad-bottom {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.ad-placeholder {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    background: #f8f9fa;
}

footer {
    margin-top: 20px;
    padding: 20px;
    text-align: center;
    color: white;
}

footer p {
    margin: 5px 0;
    font-size: 14px;
}

.disclaimer {
    font-size: 12px;
    opacity: 0.8;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    header {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    main {
        padding: 20px;
    }

    .input-group {
        flex-direction: column;
    }

    #downloadBtn {
        width: 100%;
    }
}
