/* General styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #1e1e1e;
    color: #ffff;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    text-decoration: none;
}

.nav-bar {
    display: flex;
    align-items: center;
}

.nav-item {
    margin: 0 10px;
    color: #fff;
    text-decoration: none;
}

.nav-item.active {
    font-weight: bold;
}

.auth-btn {
    background-color: #e91e63;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    margin-left: 10px;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.sidebar {
    position: fixed;
    top: 0;
    /* left: -250px; */
    width: 250px;
    height: 100%;
    background-color: #334;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    transition: left 2s;
    z-index: 2;
}

.sidebar-item {
    margin: 10px 0;
    color: #fff;
    text-decoration: none;
    z-index: 2;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    font-size: 14px;
    text-align: center;
    z-index: 2;
}

.close-btn {
    align-self: flex-end;
    margin-right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-bar {
        display: none;
    }
    .menu-btn {
        display: block;
    }
}

@media (min-width: 769px) {
    .menu-btn {
        display: block;
    }
}

.container {
    padding: 20px;
}

#roadmap {
    overflow: auto;
}

.node {
    cursor: pointer;
}

.node rect {
    fill-opacity: 0.8;
    stroke: #ffff;
    stroke-width: 1px;
}

.node-text-container {
    font: bold 12px sans-serif;
    fill: #ffff;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link {
    fill: none;
    stroke: #ffff;
    stroke-width: 1px;
}

.progress-bar {
    fill: #4a4a4a;
}

.progress {
    fill: #3498db;
}

#practice {
    padding: 20px;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    color: #3498db;
}

.problem-list {
    list-style-type: none;
    padding: 0;
}

.problem-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.problem-link {
    text-decoration: none;
    color: #ffff;
    margin-right: 10px;
}

.difficulty {
    font-size: 0.8em;
    padding: 2px 5px;
    border-radius: 3px;
    margin-right: 10px;
}

.difficulty.Easy {
    color: #2ecc71;
}

.difficulty.Medium {
    color: #f1c40f;
}

.difficulty.Hard {
    color: #e74c3c;
}

.checkbox {
    margin-left: auto;
}

.zoom-container {
    overflow: hidden;
}

#roadmap svg {
    max-width: 100%;
    max-height: 100vh;
}

.problem-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.problem-table th, .problem-table td {
    border: 1px solid #4a4a4a;
    padding: 10px;
    text-align: left;
    font-weight: bold;
}

.problem-table th {
    background-color: #2d2d2d;
}

.problem-table td {
    background-color: #1e1e1e;
}

.problem-link i {
    margin-left: 5px;
}

.launch-editor {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
}

.launch-editor i {
    margin-right: 5px;
}

.problem-table td {
    display: table-cell !important;
    width: auto !important;
}

/* New styles for column widths */
.problem-table th.status, .problem-table td.status {
    width: 5%;
}

.problem-table th.problem, .problem-table td.problem {
    width: 50%;
}

.problem-table th.difficulty, .problem-table td.difficulty {
    width: 15%;
}

.problem-table th.ide, .problem-table td.ide {
    width: 30%;
}

#sign-in-btn, #sign-out-btn {
    background-color: #3498db; /* Match your theme */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

#sign-in-btn:hover, #sign-out-btn:hover {
    background-color: #2980b9; /* Darker shade on hover */
}

.flash-message {
    position: fixed;
    top: 55px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: flex;
    align-items: center;
}

.flash-message .close-btn {
    margin-left: 10px;
    cursor: pointer;
    font-size: 18px;
}

.flash-message.show {
    opacity: 1;
}

.flash-message.success {
    background-color: #2ecc71;
}

.flash-message.error {
    background-color: #e74c3c;
}

/* General button styles */
.auth-btn {
    background-color: #4285F4; /* Google blue */
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.auth-btn i {
    margin-right: 8px; /* Space between icon and text */
}

.auth-btn:hover {
    background-color: #357ae8; /* Darker Google blue */
}

/* Additional styles if needed */
.auth-btn:active {
    background-color: #2c65c8; /* Even darker on click */
}

.auth-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.5); /* Focus ring */
}

/* Editor specific styles */
.pe-container {
    display: flex;
    height: calc(100vh - 60px);
}

.problem-description {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #252526;
    border-right: 1px solid #3e3e42;
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#editor {
    flex: 1;
    z-index: 1;
}

.output {
    height: 150px;
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 10px;
    font-family: monospace;
    overflow-y: auto;
    border-top: 1px solid #3e3e42;
}

.problem-description h1 {
    color: #d4d4d4;
    border-bottom: 1px solid #3e3e42;
    padding-bottom: 10px;
}

.problem-description pre {
    background-color: #2d2d2d;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
}

.problem-description code {
    font-family: 'Courier New', Courier, monospace;
}

.problem-description .inline-code {
    background-color: #2d2d2d;
    padding: 2px 4px;
    border-radius: 3px;
}

/* AMOLED theme */
.amoled-theme {
    background-color: #161616;
    color: #ffffff;
}

.pe-container {
    background-color: #161616;
}

.problem-description {
    background-color: #161616;
    color: #ffffff;
}

.editor-container {
    background-color: #161616;
}

.editor-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-left: 5px;
    margin-right: 5px;
}

#language-select, .reset-btn {
    background-color: #1a1a1a;
    color: #ffffff;
    border: 1px solid #333333;
    padding: 3px 5px;
    border-radius: 4px;
}

.reset-btn:hover {
    background-color: #2a2a2a;
}

#output {
    background-color: #1a1a1a;
    color: #ffffff;
}

.button-container {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-right: 5px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: #357ae8;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.action-btn:active {
    transform: translateY(1px);
}

.action-btn i {
    margin-right: 8px;
}

.prob-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0;
}

.e-difficulty {
    font-weight: bold;
}

.e-difficulty.Easy {
    color: #2ecc71;
}

.e-difficulty.Medium {
    color: #f1c40f;
}

.e-difficulty.Hard {
    color: #e74c3c;
}

.solved-status {
    color: #2ecc71;
    font-weight: bold;
}

/*iii */
#test-case-container {
    margin-top: 5px;
    border: 1px solid #3e3e42;
    border-radius: 8px;
    overflow: hidden;
}

#test-case-tabs {
    display: flex;
    background-color: #252526;
    border-bottom: 1px solid #3e3e42;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #4a4a4a #252526;
}

.test-case-tab {
    padding: 12px 20px;
    cursor: pointer;
    color: #d4d4d4;
    background-color: transparent;
    border: none;
    border-right: 1px solid #3e3e42;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.test-case-tab:hover {
    background-color: #2a2a2a;
}

.test-case-tab.active {
    background-color: #1e1e1e;
    border-bottom: 2px solid #4a90e2;
}

.test-case-tab.passed {
    color: #2ecc71;
}

.test-case-tab.failed {
    color: #e74c3c;
}

#test-case-content {
background-color: #1e1e1e;
color: #d4d4d4;
padding: 10px;
font-family: monospace;
max-height: 200px;
overflow-y: auto;
}

  .test-case-item {
    margin-bottom: 10px;
  }

  .test-case-item h4 {
    margin: 0 0 5px 0;
  }

  .test-case-item pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
  }

  .error-message {
    color: #e74c3c;
  }

  .scrollable-content {
    max-width: 100%;
    overflow-x: auto;
  }

  .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}