/* CSS 변수 정의 */
:root {
    --primary-color: #667eea !important;
    --secondary-color: #764ba2 !important;
    --accent-color: #ffd700 !important;
    --text-primary: #2c3e50 !important;
    --text-secondary: #6c757d !important;
    --bg-primary: #ffffff !important;
    --bg-secondary: #f8f9fa !important;
    --border-color: #e9ecef !important;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    --border-radius: 12px !important;
    --transition: all 0.3s ease !important;
}

/* 기본 리셋 */
* {
    box-sizing: border-box !important;
}

/* 컨테이너 스타일 */
.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
}

/* 섹션 기본 스타일 */
section {
    padding: 5rem 0 !important;
    width: 100% !important;
    position: relative !important;
}

/* SUDA.DAY 커스텀 헤더 */
.suda-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.suda-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.suda-header .logo a {
    text-decoration: none;
    color: inherit;
}

.suda-header .logo h1 {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suda-header .logo i {
    color: var(--accent-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

.main-nav a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-login,
.btn-logout {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover,
.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 관리자, 정보수정 링크 스타일 */
.btn-admin,
.btn-profile {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.btn-admin:hover,
.btn-profile:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

/* 헤더 액션 영역 정렬 개선 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* 히어로 섹션 상단 여백 추가 */
.hero {
    margin-top: 80px;
    min-height: calc(100vh - 80px) !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* SUDA.DAY 커스텀 푸터 */
.suda-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h3 i {
    color: var(--accent-color);
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.social-links .x-logo {
    font-weight: 900;
    font-size: 1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0.25rem 0;
}

/* 반응형 헤더 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem 0;
    }
    
    .main-nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        margin-top: 120px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* 프로젝트 섹션 */
.featured-projects {
    background: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--border-color);
}

.project-card.featured {
    border: 2px solid var(--primary-color);
    position: relative;
}

.project-card.featured::before {
    content: '⭐ FEATURED';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.project-icon {
    font-size: 4rem;
    color: rgba(255,255,255,0.8);
}

.project-content {
    padding: 1.5rem;
}

.project-category {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-features span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.project-features i {
    color: #28a745;
    font-size: 0.8rem;
}

.project-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.project-stats {
    display: flex;
    gap: 1rem;
}

.project-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--secondary-color);
}

/* 기술 스택 섹션 */
.tech-stack {
    background: var(--bg-secondary);
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tech-category {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tech-category:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tech-category h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tech-category h3 i {
    color: var(--primary-color);
}

.tech-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: var(--transition);
}

.tech-item:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.tech-item i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.tech-item:hover i {
    color: white;
}

.tech-item span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* 최신 게시글 섹션 */
.latest-posts {
    background: white;
}

.posts-grid {
    margin-bottom: 3rem;
}

.view-more-posts {
    text-align: center;
}

.btn-view-more {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-view-more:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 수다 채널 섹션 */
.suda-channels {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.suda-channels .section-title h2,
.suda-channels .section-title p {
    color: white;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.channel-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: white;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    transform: scaleX(0);
    transition: var(--transition);
}

.channel-card:hover::before {
    transform: scaleX(1);
}

.channel-card:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.channel-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.1);
}

.channel-info {
    flex: 1;
}

.channel-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.channel-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.channel-badge {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: var(--transition);
}

.channel-card:hover .channel-badge {
    opacity: 1;
    transform: scale(1.1);
}

/* 채널별 색상 */
.channel-card.youtube { color: #ff0000; }
.channel-card.chzzk { color: #00d4aa; }
.channel-card.kakao { color: #fee500; }
.channel-card.wiki { color: #4caf50; }
.channel-card.discord { color: #5865f2; }
.channel-card.email { color: #ea4335; }
.channel-card.instagram { color: #e4405f; }
.channel-card.twitter { color: #1da1f2; }
.channel-card.github { color: #333; }

.x-logo {
    font-weight: 900;
    font-size: 1.2rem;
}

/* 애니메이션 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes heroCardFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(1deg); }
    50% { transform: translateY(0px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(-1deg); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .title-main {
        font-size: 3rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-categories {
        grid-template-columns: 1fr;
    }
    
    .channels-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .title-main {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f8f9fa;
        --text-secondary: #adb5bd;
        --bg-primary: #212529;
        --bg-secondary: #343a40;
        --border-color: #495057;
    }
    
    body {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 포커스 스타일 */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 선택 텍스트 스타일 */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
