/* 다크 테마 공통 스타일 - Tools 버전 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e6ed;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 메인 레이아웃 */
.main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.main-content {
    flex: 2;
    min-width: 0;
}

/* 헤더 스타일 */
.header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 0;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #64b5f6, #42a5f5, #2196f3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(100, 181, 246, 0.3);
}

.header p {
    font-size: 1.2rem;
    color: #b0bec5;
    max-width: 600px;
    margin: 0 auto;
}

/* 뒤로가기 버튼 */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64b5f6;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(100, 181, 246, 0.1);
    border: 1px solid rgba(100, 181, 246, 0.2);
}

.back-btn:hover {
    background: rgba(100, 181, 246, 0.2);
    transform: translateX(-3px);
}

/* 광고 영역 스타일 */
.ad-banner {
    margin: 30px 0;
    text-align: center;
}

.ad-banner.ad-top {
    margin-top: 0;
    margin-bottom: 40px;
}

.ad-banner.ad-bottom {
    margin-top: 40px;
    margin-bottom: 0;
}

.ad-content {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.ad-content:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(100, 181, 246, 0.3);
}

.ad-sidebar {
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ad-sidebar .ad-content {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
    transition: all 0.3s ease;
    position: sticky;
    top: calc(100vh - 600px - 24px);
    box-sizing: border-box;
}

.ad-sidebar .ad-content:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(100, 181, 246, 0.3);
}

/* 인기 템플릿 TOP 5 스타일 */
.popular-templates {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.popular-templates h3 {
    color: #64b5f6;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popular-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.popular-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.popular-item .rank {
    background: linear-gradient(45deg, #64b5f6, #42a5f5);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.popular-item .template-link {
    color: #e0e6ed;
    text-decoration: none;
    font-size: 0.9rem;
    flex: 1;
    transition: color 0.3s ease;
}

.popular-item .template-link:hover {
    color: #64b5f6;
}

/* 푸터 스타일 */
.footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px 0;
    color: #b0bec5;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 도구 공통 스타일 */
.tool-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.tool-container h2 {
    color: #64b5f6;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #e0e6ed;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e0e6ed;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #64b5f6;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8a9ba8;
}

.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(45deg, #64b5f6, #42a5f5);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #42a5f5, #2196f3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 181, 246, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e6ed;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.result-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-box h3 {
    color: #64b5f6;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.result-content {
    color: #e0e6ed;
    word-break: break-all;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }

    .ad-sidebar {
        width: 100%;
        position: static;
        order: -1;
    }

    .ad-sidebar .ad-content {
        position: static;
    }

    .tool-container {
        padding: 20px;
    }

    .button-container {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
