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

body {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: #00ff00;
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 255, 0, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    overflow-x: hidden;
}

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

.terminal-header {
    background: #1a1a1a;
    border: 2px solid #00ff00;
    border-radius: 10px 10px 0 0;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.control.red {
    background: #ff5555;
}

.control.yellow {
    background: #ffb86c;
}

.control.green {
    background: #50fa7b;
}

.terminal-title {
    font-weight: bold;
    font-size: 14px;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.terminal-content {
    background: #111111;
    border: 2px solid #00ff00;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    position: relative;
}

.ascii-art {
    text-align: center;
    margin-bottom: 30px;
    font-size: 10px;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
    }
}

.welcome-message {
    margin-bottom: 30px;
}

.welcome-message h1 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.prompt-symbol {
    color: #ff6b6b;
    font-weight: bold;
    margin-right: 10px;
}

.subtitle {
    color: #00cc00;
    font-size: 16px;
    margin-bottom: 10px;
    font-style: italic;
}

.instruction {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 20px;
}

.action-section {
    text-align: center;
    margin: 40px 0;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hack-button {
    background: linear-gradient(45deg, #001100, #003300);
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 15px 30px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.hack-button:hover {
    background: linear-gradient(45deg, #003300, #006600);
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.6);
    transform: translateY(-2px);
}

.hack-button:active {
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.hack-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.hack-button:hover::before {
    left: 100%;
}

.prompt-output {
    margin-top: 30px;
    padding: 20px;
    background: #0a0a0a;
    border: 1px solid #00ff00;
    border-radius: 5px;
    min-height: 60px;
    display: none;
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.1);
}

.prompt-output.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prompt-text {
    color: #00ff00;
    font-size: 16px;
    line-height: 1.8;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.prompt-header {
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-header::before {
    content: ">";
    color: #00ff00;
    font-weight: bold;
}

.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #00ff00;
    text-align: center;
}

.status {
    font-size: 12px;
    color: #cccccc;
    margin-bottom: 10px;
}

.status-active {
    color: #00ff00;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.warning {
    font-size: 12px;
    color: #ffaa00;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .terminal-content {
        padding: 20px;
    }
    
    .ascii-art {
        font-size: 8px;
    }
    
    .welcome-message h1 {
        font-size: 20px;
    }
    
    .hack-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .ascii-art {
        font-size: 6px;
    }
    
    .welcome-message h1 {
        font-size: 18px;
    }
    
    .terminal-title {
        font-size: 12px;
    }
    
    .hack-button {
        padding: 10px 20px;
        font-size: 12px;
    }
}

/* Course Section Styles */
.course-section {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in;
}

.section-divider {
    border: none;
    border-top: 2px solid #00ff00;
    margin: 30px 0;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.course-title {
    color: #00ff00;
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
    animation: glow 2s ease-in-out infinite alternate;
}

.manual-navigation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #00ff00;
}

.manual-nav {
    background: linear-gradient(45deg, #001100, #003300);
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: none;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.manual-nav:hover:not(:disabled) {
    background: linear-gradient(45deg, #003300, #006600);
    box-shadow: 0 0 25px rgba(0, 255, 0, 0.6);
    transform: translateY(-2px);
}

.manual-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.box-lectie {
    background-color: #001100;
    border: 2px solid #00ff99;
    padding: 1rem;
    margin: 1rem auto;
    color: #00ff99;
    max-width: 600px;
    text-align: left;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 153, 0.2);
}

.box-lectie h2 {
    color: #00ff66;
    font-family: monospace;
    font-size: 20px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.5);
}

.box-lectie p {
    color: #00ff99;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.exercitiu {
    background: #000;
    border: 1px solid #00ff99;
    border-radius: 5px;
    padding: 1rem;
    margin: 20px 0;
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    color: #00ff99;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.exercitiu strong {
    color: #ff6b6b;
}

/* General h2 styling to match lesson boxes */
h2 {
    color: #00ff66;
    font-family: monospace;
}

/* Pre element styling for exercise sections */
pre {
    background: #000;
    padding: 1rem;
    border: 1px solid #00ff99;
    margin-top: 10px;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    color: #00ff99;
    border-radius: 5px;
}

/* Chat Interface */
.chat-area {
    margin: 2rem auto;
    max-width: 700px;
    background-color: #000;
    border: 2px solid #00ff99;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 153, 0.2);
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 15px;
    background-color: #001100;
    border-bottom: 1px solid #00ff99;
}

.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    line-height: 1.5;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.user-message {
    background-color: #003300;
    border-left: 4px solid #00ff99;
    text-align: right;
    margin-left: 50px;
}

.ai-message {
    background-color: #001133;
    border-left: 4px solid #0099ff;
    margin-right: 50px;
}

.message-sender {
    font-weight: bold;
    color: #00ff99;
    margin-right: 8px;
}

.ai-message .message-sender {
    color: #0099ff;
}

.message-text {
    color: #cccccc;
}

.chat-input-container {
    display: flex;
    padding: 15px;
    background-color: #000;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background-color: #000;
    color: #00ff99;
    border: 1px solid #00ff99;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 153, 0.3);
}

.chat-input::placeholder {
    color: #008866;
    opacity: 0.8;
}

.chat-input:focus {
    outline: none;
    border-color: #00ff66;
    box-shadow: 0 0 20px rgba(0, 255, 153, 0.5);
}

.chat-send-button {
    background: linear-gradient(45deg, #001133, #003366);
    color: #0099ff;
    border: 2px solid #0099ff;
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 153, 255, 0.3);
}

.chat-send-button:hover {
    background: linear-gradient(45deg, #003366, #0066cc);
    box-shadow: 0 0 25px rgba(0, 153, 255, 0.6);
    transform: translateY(-2px);
}

/* Scrollbar for chat messages */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #001100;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #00ff99;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #00cc77;
}

.ai-test-button {
    background: linear-gradient(45deg, #001133, #003366) !important;
    border-color: #0099ff !important;
    color: #0099ff !important;
    box-shadow: 0 0 15px rgba(0, 153, 255, 0.3) !important;
    margin-bottom: 20px;
}

.ai-test-button:hover {
    background: linear-gradient(45deg, #003366, #0066cc) !important;
    box-shadow: 0 0 25px rgba(0, 153, 255, 0.6) !important;
}

.ai-response {
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: #888;
}

/* Call to Action styling */
.call-to-action {
    background: linear-gradient(45deg, #001133, #003366);
    border: 2px solid #0099ff;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    color: #0099ff;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 0 15px rgba(0, 153, 255, 0.3);
    animation: pulse 2s ease-in-out infinite alternate;
}

.call-to-action strong {
    color: #00ccff;
    font-weight: bold;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 15px rgba(0, 153, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 25px rgba(0, 153, 255, 0.6);
    }
}

/* AI Button in Lessons */
.ai-button-container {
    margin: 20px 0;
    text-align: center;
}

.ai-lesson-button {
    background: linear-gradient(45deg, #330011, #660033);
    color: #ff6699;
    border: 2px solid #ff6699;
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 102, 153, 0.3);
    position: relative;
}

.ai-lesson-button:hover:not(:disabled) {
    background: linear-gradient(45deg, #660033, #990066);
    box-shadow: 0 0 25px rgba(255, 102, 153, 0.6);
    transform: translateY(-2px);
}

.ai-lesson-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(45deg, #222222, #444444);
    color: #888888;
    border-color: #888888;
    box-shadow: none;
    transform: none;
}

.tooltip-message {
    background: #333;
    color: #ccc;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 10px;
    border: 1px solid #666;
    font-style: italic;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* Domain Button in Lessons */
.domain-button-container {
    margin: 20px 0;
    text-align: center;
}

.domain-lesson-button {
    background: linear-gradient(45deg, #331100, #663300);
    color: #ff9966;
    border: 2px solid #ff9966;
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 153, 102, 0.3);
    position: relative;
}

.domain-lesson-button:hover {
    background: linear-gradient(45deg, #663300, #996600);
    box-shadow: 0 0 25px rgba(255, 153, 102, 0.6);
    transform: translateY(-2px);
}

/* Education Button in Lessons */
.education-button-container {
    margin: 20px 0;
    text-align: center;
}

.education-lesson-button {
    background: linear-gradient(45deg, #003311, #006633);
    color: #66ff99;
    border: 2px solid #66ff99;
    padding: 12px 24px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(102, 255, 153, 0.3);
    position: relative;
}

.education-lesson-button:hover {
    background: linear-gradient(45deg, #006633, #009966);
    box-shadow: 0 0 25px rgba(102, 255, 153, 0.6);
    transform: translateY(-2px);
}

.lectie-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #00ff00;
}

.nav-button {
    background: linear-gradient(45deg, #001100, #003300);
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-button:hover:not(:disabled) {
    background: linear-gradient(45deg, #003300, #006600);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lectie-counter {
    color: #00ff00;
    font-weight: bold;
    font-size: 14px;
}

.mode-toggle {
    background: linear-gradient(45deg, #110011, #330033) !important;
    border-color: #ff00ff !important;
    color: #ff00ff !important;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3) !important;
}

.mode-toggle:hover {
    background: linear-gradient(45deg, #330033, #660066) !important;
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.6) !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Authentication forms */
.auth-form {
    background: rgba(0, 20, 0, 0.3);
    border: 1px solid #00ff99;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #00ff99;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #00ff99;
    border-radius: 4px;
    color: #00ff99;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff99;
    box-shadow: 0 0 5px rgba(0, 255, 153, 0.3);
}

.auth-link {
    text-align: center;
    margin-top: 15px;
}

.auth-link p {
    color: #00ff99;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.auth-link a {
    color: #00ff99;
    text-decoration: underline;
}

.auth-link a:hover {
    color: #ffffff;
}

.flash-messages {
    margin: 20px 0;
    text-align: center;
}

.flash-message {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    color: #ff0000;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #00ff99;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.logout-link {
    color: #ff0000;
    text-decoration: none;
    font-size: 12px;
}

.logout-link:hover {
    color: #ffffff;
}

.status-inactive {
    color: #ff0000;
}
