/**
 * Tools & Tech Stack Page Styles
 * 기술스택 및 개발도구 포트폴리오 페이지 전용 스타일
 */

:root {
    --radius-full: 9999px;
}

/* ===== AdSense Optimization Styles ===== */
.ad-container {
    margin: 3rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ad-container:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.ad-label {
    position: absolute;
    top: 10px;
    left: 16px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
    z-index: 1;
}

.adsbygoogle {
    width: 100%;
    max-width: 100%;
    display: block !important;
}

.top-banner-ad {
    margin: 2rem 0 3rem 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.middle-content-ad {
    margin: 4rem 0;
}

.bottom-content-ad {
    margin: 3rem 0 2rem 0;
}

.side-ad-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    max-height: 600px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px;
}

.desktop-only {
    display: block;
}

/* Ad loading states */
.ad-container:empty::after {
    content: '광고 로딩 중...';
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-align: center;
    animation: pulse 2s infinite;
}

.ad-container.failed::after {
    content: '광고를 불러올 수 없습니다';
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Enhanced Progress Indicator */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #4a3aff 0%, #a5b4fc 50%, #ddd6fe 100%);
    z-index: 10000;
    transition: width 0.05s ease-out;
    border-radius: 0 0 2px 0;
}

.progress-indicator.near-complete {
    box-shadow: 0 0 20px rgba(221, 214, 254, 0.6),
               0 0 30px rgba(221, 214, 254, 0.4);
    filter: brightness(1.2);
}

/* Navigation Back Button */
.nav-back {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-back:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    color: #764ba2;
}

/* Hide nav-back on desktop, show only on mobile */
@media (min-width: 769px) {
    .nav-back {
        display: none;
    }
}

.nav-back svg {
    width: 16px;
    height: 16px;
}

.nav-back.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.tech-stack-main {
    max-width: 1200px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
}

.header-section {
    text-align: center;
    margin-bottom: 48px;
}

.tech-character {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    animation: techFloat 4s ease-in-out infinite;
}

@keyframes techFloat {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-10px) rotateY(180deg); }
}

.tech-character i {
    font-size: 4rem;
    color: white;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.tech-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.tech-desc {
    color: #666;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.category-section {
    margin-bottom: 48px;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-icon {
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tech-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.tech-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tech-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tech-icon {
    font-size: 2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.tech-level {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.level-expert {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.level-advanced {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.level-intermediate {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.level-beginner {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.level-learning {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: white;
}

.level-planned {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.tech-desc {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4338ca;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid rgba(67, 56, 202, 0.1);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .side-ad-container {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .tech-stack-main {
        margin: 20px auto;
        padding: 24px;
    }
    
    .tech-title {
        font-size: 2rem;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .tech-character {
        width: 100px;
        height: 100px;
    }
    
    .tech-character i {
        font-size: 3rem;
    }
    
    .ad-container {
        margin: 2rem 0;
        padding: 1rem;
        min-height: 100px;
    }
    
    .top-banner-ad {
        margin: 1rem 0 2rem 0;
    }
    
    .middle-content-ad,
    .bottom-content-ad {
        margin: 2rem 0;
    }
    
    .ad-label {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .desktop-only {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .tech-stack-main {
        padding: 16px;
    }
    
    .tech-card {
        padding: 20px;
    }
    
    .tech-title {
        font-size: 1.8rem;
    }
    
    .tech-desc {
        font-size: 1rem;
    }
    
    .ad-container {
        margin: 1.5rem 0;
        padding: 0.75rem;
        min-height: 80px;
        border-radius: 12px;
    }
    
    .ad-label {
        top: 8px;
        left: 12px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #764ba2, #f093fb);
    box-shadow: 0 0 10px rgba(118, 75, 162, 0.5);
}