body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.navbar {
    background-color: #007bff;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.content-wrapper {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 300px;
    background-color: #f5f5f5;
    border-right: 1px solid #ddd;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    padding: 20px;
}

.sidebar h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.problem-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.problem-item:hover {
    background-color: #e9ecef;
}

.problem-item.completed {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.problem-item.completed:hover {
    background-color: #c3e6cb;
}

.problem-item.available {
    background-color: #fff;
    border-color: #007bff;
    cursor: pointer;
}

.problem-item.available:hover {
    background-color: #e9ecef;
}

.problem-item.locked {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.7;
}

.problem-item.locked:hover {
    background-color: #f8f9fa;
}

.problem-locked-message {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
}

.locked-icon {
    font-size: 12px;
}

.next-problem-section {
    margin-top: 20px;
    text-align: center;
}

.next-problem-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.next-problem-button:hover {
    background-color: #218838;
}

.completion-message {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 10px;
    margin: 20px 0;
}

.completion-message h1 {
    color: #155724;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.completion-message p {
    color: #155724;
    font-size: 1.2em;
    margin: 0;
}

.problem-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.problem-index {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.problem-item.completed .problem-index {
    background-color: #28a745;
}

.completion-tick {
    font-size: 14px;
    font-weight: bold;
}

.problem-title {
    font-weight: bold;
    color: #007bff;
    flex: 1;
}

.problem-description {
    color: #666;
    font-size: 14px;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}

.error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
}

.code-input-section {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.code-input-section h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.code-textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
}

.code-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.code-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.run-button, .clear-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.run-button {
    background-color: #28a745;
    color: white;
}

.run-button:hover {
    background-color: #218838;
}

.run-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.clear-button {
    background-color: #6c757d;
    color: white;
}

.clear-button:hover {
    background-color: #5a6268;
}

/* Result Display Styles */
.result-display {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.result-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
}

.result-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.1);
}

.success-animation {
    margin-bottom: 15px;
    text-align: center;
}

.success-gif {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.error-icon {
    margin-bottom: 15px;
    text-align: center;
}

.error-gif {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.success-title {
    color: #155724;
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.error-title {
    color: #721c24;
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.result-output, .result-error-details {
    margin-top: 15px;
    text-align: left;
}

.result-output h4, .result-error-details h4 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 1rem;
}

.result-output pre, .result-error-details pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

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

/* Additional success state styling */
.result-success .success-animation {
    filter: drop-shadow(0 4px 8px rgba(0, 123, 255, 0.3));
}

.result-success .success-title {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
