/* Transistech Academy - Kid-Friendly Styles */

:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gold-color: #ffd700;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    min-height: 500px;
}

.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section h4,
.hero-section h5,
.hero-section h6,
.hero-section p,
.hero-section .lead {
    color: #000000 !important;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.bg-gradient-primary h1,
.bg-gradient-primary h2,
.bg-gradient-primary h3,
.bg-gradient-primary h4,
.bg-gradient-primary h5,
.bg-gradient-primary h6,
.bg-gradient-primary p,
.bg-gradient-primary .lead {
    color: #000000 !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.module-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

.stat-card {
    border-radius: 20px;
    background: linear-gradient(145deg, var(--primary-color) 0%, #0056b3 100%);
}

/* Buttons */
.btn {
    border-radius: 25px;
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

/* Badges */
.badge {
    border-radius: 15px;
    padding: 8px 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.bg-warning {
    color: #000;
}

/* Inventor Cards */
.inventor-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #f0f0f0;
}

.inventor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 123, 255, 0.2);
}

.inventor-icon {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.inventor-stats .badge {
    font-size: 0.75rem;
    padding: 0.4em 0.6em;
}

/* Progress Bars */
.progress {
    height: 25px;
    border-radius: 15px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: width 0.6s ease;
}

/* Navbar */
.navbar-brand img {
    border-radius: 10px;
}

/* Welcome Banner */
.welcome-banner {
    border-radius: 20px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.3);
}

.welcome-banner h1,
.welcome-banner h2,
.welcome-banner h3,
.welcome-banner h4,
.welcome-banner h5,
.welcome-banner h6,
.welcome-banner p,
.welcome-banner .lead {
    color: #000000 !important;
}

/* Avatar */
.avatar-placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* Module Icons */
.module-icon i {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 50%;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.feature-icon i {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 50%;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Text Colors */
.text-gold {
    color: var(--gold-color) !important;
}

/* Leaderboard */
.leaderboard-item {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(5px);
}

.leaderboard-rank {
    background: linear-gradient(145deg, var(--warning-color), #e0a800);
    color: #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Console and Editor Styles */
.console-output {
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    padding: 15px;
    border-radius: 10px;
    height: 200px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.4;
}

.test-results {
    height: 200px;
    overflow-y: auto;
}

.assignment-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.assignment-content h1,
.assignment-content h2,
.assignment-content h3 {
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

.assignment-content code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.assignment-content pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

/* Challenge/Assignment List Items */
.challenge-item,
.assignment-item {
    border-radius: 10px !important;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.challenge-item:hover,
.assignment-item:hover {
    background-color: #e3f2fd !important;
    transform: translateX(5px);
}

.challenge-item.active,
.assignment-item.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: none;
    font-weight: 500;
}

.alert-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
}

.social-links a {
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .stat-card .card-body {
        padding: 1rem;
    }
    
    .console-output,
    .test-results {
        height: 150px;
    }
}

/* Loading Spinner */
.spinner-border {
    animation: spin 1s linear infinite;
}

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

/* Success Animations */
.success-animation {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    80% {
        transform: translateY(-10px);
    }
}

/* Custom Scrollbars */
.console-output::-webkit-scrollbar,
.test-results::-webkit-scrollbar,
.assignment-content::-webkit-scrollbar {
    width: 8px;
}

.console-output::-webkit-scrollbar-track,
.test-results::-webkit-scrollbar-track,
.assignment-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.console-output::-webkit-scrollbar-thumb,
.test-results::-webkit-scrollbar-thumb,
.assignment-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.console-output::-webkit-scrollbar-thumb:hover,
.test-results::-webkit-scrollbar-thumb:hover,
.assignment-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Maze Canvas */
#maze-canvas {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Blockly Workspace */
#blocklyDiv {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Editor Container */
#editor {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Pending Approval Styles */
.pending-approval {
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

/* Table Styles */
.table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: linear-gradient(145deg, var(--primary-color), #0056b3);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Modal Styles */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-radius: 20px 20px 0 0;
    border-bottom: none;
}

.modal-footer {
    border-top: none;
    border-radius: 0 0 20px 20px;
}

/* Form Styles */
.form-control {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
}

/* Tab Styles */
.nav-tabs .nav-link {
    border-radius: 15px 15px 0 0;
    border: none;
    background-color: #f8f9fa;
    color: #6c757d;
    font-weight: 600;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.nav-tabs .nav-link:hover {
    background-color: #e9ecef;
}