/* CyberCorp 企業系統樣式 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* 頭部樣式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.logo h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 5px;
}

.logo p {
    color: #7f8c8d;
    font-size: 1.1em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
    color: #2c3e50;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c0392b;
}

/* 登入區域樣式 */
.login-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.login-container h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
}

/* 場景標籤 */
.scenario-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.tab-btn {
    background: #ecf0f1;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    color: #2c3e50;
}

.tab-btn.active {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.tab-btn:hover {
    background: #bdc3c7;
}

.tab-btn.active:hover {
    background: #2980b9;
}

/* 場景內容 */
.scenario-content {
    display: none;
    animation: fadeIn 0.5s;
}

.scenario-content.active {
    display: block;
}

.scenario-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.scenario-desc {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-style: italic;
}

/* 表單樣式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-login {
    width: 100%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* 提示樣式 */
.hint {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 10px;
    margin-top: 8px;
    font-size: 14px;
    color: #856404;
}

/* 主要內容區域 */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.dashboard h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

/* 用戶資料卡片 */
.user-profile {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.user-profile h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.user-profile p {
    margin-bottom: 8px;
    color: #555;
}

/* 管理面板 */
.admin-panel, .manager-panel, .hr-admin-panel {
    background: #e8f5e8;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

.btn-admin, .btn-manager {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.btn-admin:hover, .btn-manager:hover {
    background: #219a52;
}

/* 文件瀏覽器 */
.file-browser {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.file-list {
    list-style: none;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    transition: background 0.3s;
}

.file-item:hover {
    background: #e9ecef;
}

.file-item.confidential {
    background: #fff5f5;
    border-left: 4px solid #e74c3c;
}

.file-name {
    font-weight: bold;
}

.btn-file {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-file:hover {
    background: #2980b9;
}

/* 漏洞信息區域 */
.vulnerability-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #f39c12;
}

.vulnerability-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.challenge-info {
    background: #fef9e7;
    border-radius: 8px;
    padding: 20px;
}

.challenge-info h4 {
    color: #f39c12;
    margin-bottom: 10px;
}

.objectives {
    margin-top: 15px;
}

.objectives h5 {
    color: #e67e22;
    margin-bottom: 10px;
}

.objectives ul {
    padding-left: 20px;
}

.objectives li {
    margin-bottom: 5px;
    color: #555;
}

/* 提示系統 */
.hint-system {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-hint {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-hint:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

.hints-container {
    margin-top: 20px;
    background: #f4f1ff;
    border-radius: 10px;
    padding: 20px;
}

.hints-container h4 {
    color: #9b59b6;
    margin-bottom: 15px;
}

.hint-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid #9b59b6;
    color: #555;
}

/* 成功和錯誤訊息 */
.success-message, .error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 400px;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-reset, .btn-close {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-close {
    background: transparent;
    color: #721c24;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    padding: 0;
    width: 25px;
    height: 25px;
}

/* 開發者工具 */
.dev-tools {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.btn-dev {
    background: #34495e;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.btn-dev:hover {
    background: #2c3e50;
    transform: scale(1.1);
}

.dev-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.dev-panel h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.btn-debug {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 12px;
}

.btn-debug:hover {
    background: #7f8c8d;
}

#debugInfo {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
}

/* 警告樣式 */
.warning {
    color: #e74c3c !important;
    font-weight: bold;
    background: #ffeaa7;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

/* 動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .scenario-tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    .login-section, .main-content, .vulnerability-info, .hint-system {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 2em;
    }
    
    .dev-tools {
        bottom: 10px;
        right: 10px;
    }
    
    .dev-panel {
        width: 250px;
    }
    
    .success-message, .error-message {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-admin, .btn-manager {
        width: 100%;
        margin-right: 0;
    }
}