/* ==========================================
   Nexus OS - Cyberpunk Minimalism Style
   ========================================== */

/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    color: #E0E0E0;
    line-height: 1.6;
    min-height: 100vh;
}

/* 컨테이너 */
.nexus-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================
   헤더 스타일
   ========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #111111;
    border-bottom: 3px solid #00FFFF;
    backdrop-filter: blur(10px);
    background-color: rgba(17, 17, 17, 0.95);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

header h1 {
    font-size: 1.8rem;
    color: #00FFFF;
    text-shadow: 0 0 5px #00FFFF, 0 0 10px #00FFFF, 0 0 20px #00FFFF;
    letter-spacing: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #00FFFF;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: #FFFFFF;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #00FFFF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }

    nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #0a0a0a;
        border-bottom: 1px solid #333333;
        padding: 1rem;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    header h1 {
        font-size: 1.4rem;
    }
}

/* ==========================================
   히어로 섹션
   ========================================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 70px;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.3),
        rgba(10, 10, 10, 0.5),
        rgba(10, 10, 10, 0.8)
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero h2 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: #FFFFFF;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 0 20px rgba(0, 255, 255, 0.3);
    font-weight: 700;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.5rem;
    color: #E0E0E0;
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.btn-primary {
    background: #00FFFF;
    color: #0a0a0a;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.btn-primary:hover {
    background: #FFFFFF;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    color: #00FFFF;
    border: 2px solid #00FFFF;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: #00FFFF;
    color: #0a0a0a;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.arrow-down {
    width: 24px;
    height: 24px;
    color: #00FFFF;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   메인 콘텐츠
   ========================================== */
main {
    flex: 1;
    padding: 4rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.section-header p {
    font-size: 1.1rem;
    color: #999999;
}

/* ==========================================
   위젯 섹션
   ========================================== */
.widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.widget {
    background: #1c1c1c;
    border: 2px solid #00FFFF;
    border-radius: 0.25rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
}

.widget-status {
    border-color: #00FFFF;
}

.widget-security {
    border-color: #00FF00;
}

.widget-security .widget-header h3 {
    color: #00FF00;
}

.widget-console {
    border-color: #00FF00;
}

.widget-console .widget-header h3 {
    color: #00FF00;
}

.widget-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #333333;
}

.widget-header h3 {
    font-size: 1.3rem;
    color: #00FFFF;
    margin: 0;
}

.widget-body {
    color: #E0E0E0;
}

/* 상태 항목 */
.status-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px dotted #333333;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item .label {
    color: #999999;
}

.status-item .value {
    font-weight: 600;
    color: #E0E0E0;
}

.status-ok {
    color: #00FF00 !important;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

/* 상태 바 */
.status-bar {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #333333;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FF6600);
    transition: width 0.3s ease;
}

/* 방문자 리스트 */
.visitors-list {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

/* 보안 상태 스타일 */
.security-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px dotted #333333;
}

.security-item:last-child {
    border-bottom: none;
}

.security-item .label {
    color: #999999;
}

.security-item .value {
    font-weight: 600;
    color: #E0E0E0;
}

.security-ok {
    color: #00FF00 !important;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

.security-score {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #333333;
    font-size: 0.9rem;
    color: #999999;
}

.security-score span {
    color: #00FF00;
    font-weight: 600;
}

/* 콘솔 스타일 */
.console-output {
    background: #000000;
    border: 1px solid #00FF00;
    border-radius: 0.25rem;
    padding: 1rem;
    height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.console-output p {
    margin: 0.25rem 0;
    color: #00FF00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.console-output .user-input {
    color: #00FFFF;
}

.console-output .output {
    color: #E0E0E0;
}

.console-output .error {
    color: #FF4444;
}

.console-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.prompt {
    color: #00FF00;
    font-weight: 600;
}

.console-input {
    flex: 1;
    background: #000000;
    border: 1px solid #00FF00;
    color: #00FF00;
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    border-radius: 0.25rem;
    outline: none;
    transition: all 0.2s ease;
}

.console-input:focus {
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    border-color: #00FFFF;
}

.console-input::placeholder {
    color: #666666;
}

.console-hint {
    font-size: 0.8rem;
    color: #666666;
    margin: 0;
}

/* ==========================================
   기능 소개 섹션
   ========================================== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #333333;
}

.feature-card {
    background: #1a1a1a;
    border: 1px solid #333333;
    padding: 2rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    border-color: #00FFFF;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #00FFFF;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.feature-card p {
    color: #999999;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================
   푸터
   ========================================== */
footer {
    background: #111111;
    border-top: 3px solid #00FFFF;
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #00FFFF;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.footer-section p {
    color: #999999;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #999999;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #00FFFF;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: #666666;
    font-size: 0.85rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #666666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00FFFF;
}

/* ==========================================
   모달 팝업 스타일
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1c1c1c;
    border: 2px solid #00FFFF;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-content.modal-large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #333333;
}

.modal-header h2 {
    color: #00FFFF;
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.modal-close {
    background: none;
    border: none;
    color: #00FFFF;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #FF00FF;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.modal-body {
    padding: 1.5rem;
    color: #E0E0E0;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #333333;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.init-animation {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #333333;
    border-top: 3px solid #00FFFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#initStatus {
    color: #00FFFF;
    font-weight: 600;
    margin: 1rem 0;
}

.progress-bar-modal {
    width: 100%;
    height: 10px;
    background: #0a0a0a;
    border: 1px solid #333333;
    border-radius: 5px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.progress-fill-modal {
    height: 100%;
    background: linear-gradient(90deg, #00FFFF, #00FF00);
    transition: width 0.3s ease;
}

#initPercent {
    color: #00FFFF;
    font-weight: 600;
}

.info-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-section {
    border-left: 3px solid #00FFFF;
    padding-left: 1.5rem;
    padding-bottom: 1rem;
}

.info-section h3 {
    color: #00FFFF;
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.info-section p {
    margin: 0.5rem 0;
    color: #E0E0E0;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 0.75rem 0;
    color: #E0E0E0;
    border-bottom: 1px dotted #333333;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list strong {
    color: #00FFFF;
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.command-item {
    background: #0a0a0a;
    border: 1px solid #333333;
    padding: 0.75rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    color: #E0E0E0;
}

.command-item code {
    color: #00FF00;
    font-weight: 600;
}

.system-info {
    background: #0a0a0a;
    border: 1px solid #333333;
    padding: 1rem;
    border-radius: 0.25rem;
}

.system-info p {
    margin: 0.5rem 0;
}

.system-info strong {
    color: #00FFFF;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================
   스크롤바 스타일
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #00FFFF;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF00FF;
}

/* ==========================================
   반응형 디자인
   ========================================== */
@media (max-width: 1024px) {
    main {
        padding: 3rem 1.5rem;
    }

    .widgets {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==========================================
   애니메이션
   ========================================== */
@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor;
    }
    50% {
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor;
    }
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

.blink {
    animation: blink 1s step-end infinite;
}

/* ==========================================
   문서 및 커뮤니티 페이지 스타일
   ========================================== */
.docs-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.doc-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333333;
}

.doc-section:last-child {
    border-bottom: none;
}

.doc-section h3 {
    color: #00FFFF;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.doc-section > p {
    color: #999999;
    margin-bottom: 1.5rem;
}

.doc-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.doc-item {
    background: #0a0a0a;
    border: 1px solid #333333;
    border-left: 3px solid #00FFFF;
    padding: 1.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.doc-item:hover {
    border-left-color: #FF00FF;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.doc-item h4 {
    color: #00FFFF;
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.doc-item p {
    color: #E0E0E0;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.doc-item code {
    display: block;
    background: #1c1c1c;
    border: 1px solid #333333;
    padding: 0.75rem;
    margin-top: 0.75rem;
    border-radius: 0.25rem;
    color: #00FF00;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.community-hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(255, 0, 255, 0.1) 100%);
    border: 1px solid #333333;
    border-radius: 0.5rem;
    margin-bottom: 3rem;
}

.community-hero h3 {
    color: #00FFFF;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.community-hero p {
    color: #E0E0E0;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* 헤더 콘텐츠 스타일 */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-content h1 {
    font-size: 1.5rem;
    margin: 0;
}

.header-content nav {
    display: flex;
}

.header-content nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-content nav a {
    color: #E0E0E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-content nav a:hover {
    color: #00FFFF;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #00FFFF;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .header-content nav {
        display: none;
    }
    
    .header-content nav.active {
        display: flex;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #0a0a0a;
        border-bottom: 1px solid #333333;
        flex-direction: column;
        padding: 1rem;
    }
    
    .header-content nav.active ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .doc-items {
        grid-template-columns: 1fr;
    }
    
    .community-hero h3 {
        font-size: 1.5rem;
    }
}