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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #e0e6ff;
    height: 100vh;
    overflow: hidden;
}

.terminal-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(0, 20, 60, 0.9);
    border: 2px solid #4a90e2;
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.3);
}

.terminal-header {
    background: linear-gradient(90deg, #2a5298 0%, #4a90e2 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #4a90e2;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.terminal-title {
    font-weight: bold;
    font-size: 16px;
    color: #ffffff;
}

.project-info {
    font-size: 12px;
    color: #b8d4ff;
}

.controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    background-color: #f0ad4e;
    color: #000000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid #e67e22;
    white-space: nowrap;
}

.btn:hover:not(:disabled) {
    background-color: #e67e22;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

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

.btn-primary, .btn-secondary, .btn-tertiary {
    background: #f0ad4e;
    color: #000000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid #e67e22;
}

.btn-primary:hover:not(:disabled), .btn-secondary:hover:not(:disabled), .btn-tertiary:hover:not(:disabled) {
    background: #e67e22;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-success {
    background: #5cb85c;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #449d44;
}

.btn-warning {
    background: #f0ad4e;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #ec971f;
}

.btn-info {
    background: #5bc0de;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #46b8da;
}

.terminal-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

.status-panel {
    display: flex;
    gap: 30px;
    padding: 15px;
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid #4a90e2;
    border-radius: 6px;
}

.status-item {
    display: flex;
    gap: 8px;
}

.status-label {
    color: #b8d4ff;
    font-weight: bold;
}

.status-value {
    color: #ffffff;
}

.main-panels {
    flex: 1;
    display: flex;
    gap: 15px;
    overflow: hidden;
}

.panel {
    flex: 1;
    background: rgba(0, 20, 60, 0.6);
    border: 1px solid #4a90e2;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    background: rgba(74, 144, 226, 0.2);
    padding: 12px 15px;
    border-bottom: 1px solid #4a90e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    color: #ffffff;
    font-size: 14px;
    margin: 0;
}

#fileSelector {
    background: rgba(0, 20, 60, 0.8);
    color: #e0e6ff;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 12px;
}

.analysis-tabs {
    display: flex;
    gap: 5px;
}

.tab-btn {
    padding: 6px 12px;
    background: rgba(74, 144, 226, 0.3);
    border: 1px solid #4a90e2;
    border-radius: 4px;
    color: #b8d4ff;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: #4a90e2;
    color: #ffffff;
}

.panel-content {
    flex: 1;
    padding: 15px;
    overflow: auto;
}

.tab-content {
    display: none;
    height: 100%;
}

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

.code-display,
.analysis-results {
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #4a90e2;
    border-radius: 4px;
    padding: 15px;
    font-size: 13px;
    line-height: 1.4;
    overflow: auto;
}

.placeholder {
    color: #7799cc;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
}

.code-line {
    margin-bottom: 8px;
    padding: 4px 8px;
    border-radius: 3px;
    background: rgba(74, 144, 226, 0.05);
}

.code-comment {
    color: #90c695;
    font-style: italic;
    margin-left: 20px;
    font-size: 12px;
}

.refactor-suggestion {
    background: rgba(240, 173, 78, 0.1);
    border: 1px solid #f0ad4e;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
}

.suggestion-title {
    color: #f0ad4e;
    font-weight: bold;
    margin-bottom: 6px;
}

.suggestion-content {
    color: #e0e6ff;
    font-size: 12px;
    line-height: 1.4;
}

.progress-panel {
    background: rgba(74, 144, 226, 0.15);
    border-bottom: 1px solid #4a90e2;
    padding: 10px 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.progress-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #4a90e2;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #5cb85c);
    width: 0%;
    transition: width 0.3s ease;
}

.terminal-footer {
    background: rgba(74, 144, 226, 0.2);
    padding: 8px 20px;
    border-top: 1px solid #4a90e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
}

.output-controls {
    display: flex;
    gap: 10px;
}

.footer-info {
    font-size: 11px;
    color: #b8d4ff;
    font-style: italic;
}

.user-input {
    background: rgba(0, 20, 60, 0.8);
    color: #e0e6ff;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 11px;
    width: 120px;
    margin-right: 10px;
}

.user-input::placeholder {
    color: #7799cc;
}

.project-input {
    background: rgba(0, 20, 60, 0.8);
    color: #e0e6ff;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 11px;
    width: 150px;
}

.project-input::placeholder {
    color: #7799cc;
}

.user-panel {
    background: rgba(91, 192, 222, 0.1);
    border: 1px solid #5bc0de;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.user-panel.projects-loaded {
    background: rgba(91, 192, 222, 0.2);
    border: 2px solid #5bc0de;
    box-shadow: 0 0 20px rgba(91, 192, 222, 0.4);
    animation: pulse-glow 2s ease-in-out;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(91, 192, 222, 0.4);
    }
    50% { 
        box-shadow: 0 0 30px rgba(91, 192, 222, 0.8);
    }
}

.user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
}

.user-description {
    color: #b8d4ff;
    font-size: 12px;
}

.user-projects {
    display: flex;
    gap: 10px;
    align-items: center;
    transition: all 0.3s ease;
}

.user-projects.projects-ready {
    background: rgba(91, 192, 222, 0.2);
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #5bc0de;
    box-shadow: 0 0 15px rgba(91, 192, 222, 0.3);
}

.user-projects label {
    color: #b8d4ff;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.user-projects.projects-ready label {
    color: #ffffff;
    font-size: 13px;
    text-shadow: 0 0 10px rgba(91, 192, 222, 0.8);
}

#userProjectSelector {
    background: rgba(0, 20, 60, 0.8);
    color: #e0e6ff;
    border: 1px solid #5bc0de;
    border-radius: 4px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 12px;
    min-width: 200px;
    transition: all 0.3s ease;
}

.user-projects.projects-ready #userProjectSelector {
    background: rgba(0, 20, 60, 0.9);
    border: 2px solid #5bc0de;
    box-shadow: 0 0 10px rgba(91, 192, 222, 0.5);
    font-size: 13px;
    font-weight: bold;
}

#userProjectSelector:focus {
    outline: none;
    border: 2px solid #46b8da;
    box-shadow: 0 0 15px rgba(91, 192, 222, 0.6);
}

.download-options {
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid #4a90e2;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
    display: none;
}

.download-option {
    margin: 8px 0;
    padding: 8px 12px;
    background: rgba(74, 144, 226, 0.2);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-info {
    color: #b8d4ff;
    font-size: 12px;
}

.download-button {
    background: #5cb85c;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.download-button:hover {
    background: #449d44;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

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

::-webkit-scrollbar-thumb:hover {
    background: #357abd;
}