/* =============================================
   CYBERCODE ACADEMY - COMPONENTS
   ============================================= */

/* Cards */
.cyber-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.cyber-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(88, 166, 255, 0.1);
    transform: translateY(-4px);
}

/* Code Block */
.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 14px;
    overflow-x: auto;
    position: relative;
}

.code-block .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.code-lang {
    color: var(--accent-primary);
    font-size: 12px;
    text-transform: uppercase;
}

.copy-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.copy-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 4px;
}

.tag-primary {
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.tag-success {
    background: rgba(63, 185, 80, 0.1);
    color: var(--accent-secondary);
    border: 1px solid var(--accent-secondary);
}

.tag-warning {
    background: rgba(210, 153, 29, 0.1);
    color: var(--accent-warning);
    border: 1px solid var(--accent-warning);
}

.tag-danger {
    background: rgba(248, 81, 73, 0.1);
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-info {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.alert-success {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
}

.tab-btn.active {
    color: var(--accent-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}