:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --bg-color: #0f0c29;
    --container-bg: rgba(255, 255, 255, 0.05);
    --text-color: #f5f6fa;
    --accent-color: #00cec9;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #000;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header & Navigation */
#main-header {
    background: rgba(15, 12, 41, 0.95);
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--primary-color);
}

#main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 206, 201, 0.5);
}

#main-header ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

#main-header ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

#main-header ul li a:hover, #main-header ul li a.active {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

/* Tab Content Visibility */
.tab-content {
    display: none;
    padding: 40px 20px;
    min-height: 70vh;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Tetris Tab Layout */
#tetris-layout-mini {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    gap: 30px;
    margin-bottom: 30px;
}

.mini-sidebar {
    flex: 1;
    max-width: 200px;
}

.model-img-mini {
    width: 100%;
    border-radius: 12px;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.game-wrapper {
    flex: 2;
    text-align: center;
    max-width: 320px;
}

/* AI Tab Layout */
.ai-wrapper {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.ai-main-container {
    background: var(--container-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Score and Canvas */
.score-board { font-size: 1.5rem; color: #0DFF72; margin: 10px 0; font-weight: bold; }
#canvas-container { position: relative; border: 4px solid #fff; border-radius: 10px; overflow: hidden; margin: 0 auto; width: 248px;}
canvas { display: block; background: #000; }
#start-button { padding: 12px 25px; background: #0DFF72; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; }
#pause-button { padding: 8px 15px; background: #FFE138; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; margin-top: 10px; }

/* Contact Form */
#contact-form-container { margin-top: 25px; background: rgba(255,255,255,0.08); padding: 20px; border-radius: 12px; }
#contact-form-container input, #contact-form-container textarea { width: 100%; padding: 10px; background: #333; border: none; color: #fff; margin-bottom: 10px; border-radius: 5px; }
#contact-form-container button { width: 100%; padding: 10px; background: #0DFF72; border: none; font-weight: bold; cursor: pointer; border-radius: 5px; }

/* Disqus */
#disqus-container-large {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 15px;
    color: #fff;
    margin-top: 40px;
}

/* Info Container */
#info-container {
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.content-box {
    background: var(--container-bg);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid rgba(255,255,255,0.1);
}

.content-box h2 {
    color: var(--accent-color);
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-left: 5px solid var(--accent-color);
    padding-left: 15px;
}

/* Footer */
#main-footer {
    background: #0f0c29;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* AI Classifier Components */
.ai-wrapper h1 { font-size: 2.2rem; background: linear-gradient(to right, #a29bfe, #6c5ce7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 10px; }
.subtitle { color: #b2bec3; margin-bottom: 25px; }
.mode-btn { padding: 10px 25px; background: rgba(255,255,255,0.1); border: none; border-radius: 25px; color: #fff; cursor: pointer; transition: 0.3s; margin: 0 5px; }
.mode-btn.active { background: var(--primary-color); }
.media-container { width: 100%; aspect-ratio: 1/1; background: rgba(0,0,0,0.4); border-radius: 15px; border: 2px dashed rgba(255,255,255,0.2); margin: 20px 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#image-preview { max-width: 100%; max-height: 100%; }
#start-btn { padding: 10px 30px; background: var(--primary-color); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; }

/* AI Results */
#result-section { margin-top: 25px; background: rgba(255,255,255,0.05); padding: 20px; border-radius: 15px; }
.result-bar-container { margin-bottom: 15px; text-align: left; }
.label-info { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 5px; }
.progress-bar { height: 10px; background: rgba(255,255,255,0.1); border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary-color); width: 0%; transition: width 0.3s; }

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 800px) {
    #tetris-layout-mini { flex-direction: column; align-items: center; }
    .mini-sidebar { display: none; }
    #main-header nav { flex-direction: column; gap: 15px; }
    #main-header ul { gap: 10px; }
    #main-header ul li a { font-size: 0.85rem; }
}
