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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2f3963 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* View Container - controls which view is visible */
.view-container {
    max-width: 1400px;
    margin: 0 auto;
}

.view {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view.active {
    display: block;
}

.kanban-container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: left;
    color: white;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.linking-reminder {
    display: none;
    position: relative; 
    left: 0; 
    right: 0; 
    margin-left: auto; 
    margin-right: 0; 
    width: 250px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.try-link {
    position: absolute;
}

.cancel-link {
    cursor: pointer;
}

.board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.board-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.board-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.board-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.board-icon {
    font-size: 1.8rem;
}

.board-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
}

.task-preview {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #3b82f6;
}

.task-preview.no-task {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-style: italic;
}

.task-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.task-description {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.task-priority {
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-low {
    background: #d1fae5;
    color: #059669;
}

.board-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.board-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.board-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.board-icon {
    font-size: 1.8rem;
}

.board-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
}

.column {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 500px;
    transition: all 0.3s ease;
    max-width: 400px;
}

.board-column {
    cursor: pointer;
}

.column:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.column.drag-over {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.column-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.task-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.task {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: grab;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    touch-action: none;        /* Prevent scroll while dragging */
    user-select: none;         /* Prevent text selection */
    -webkit-user-select: none; /* Safari support */
}

.task.touch-dragging {
    opacity: 0.8;              /* Semi-transparent */
    transform: scale(1.05) rotate(3deg); /* Lift & tilt */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); /* Deeper shadow */
    z-index: 1000;             /* Above everything */
    position: fixed;           /* Move freely */
    pointer-events: none;      /* Don't block touches */
}

.task:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.task.dragging {
    opacity: 0.7;
    transform: rotate(5deg) scale(1.05);
    cursor: grabbing;
    z-index: 1000;
}

.title-buttons {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    overflow-wrap: anywhere;
    /* max-width: 180px; */
}

.task-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.task-priority {
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-low {
    background: #d1fae5;
    color: #059669;
}

.task-assignee {
    color: #6b7280;
    font-weight: 500;
}

.heatmap-div {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: black;
    border-radius: 5px;
    margin-top: 5px;
}

.gh-heatmap {
    display: grid;
    grid-template-columns: repeat(15, 8px);
    grid-auto-rows: 8px;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.gh-heatmap-task {
    display: grid;
    grid-template-columns: repeat(15, 8px);
    grid-auto-rows: 8px;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.gh-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 4px;
    background-color: rgba(255,255,255,0.1);
}

.add-task-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-task-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.plus-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    min-width: 120px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 5px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .board {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

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

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: flex-end;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #4b5563;
}

.priority-options {
    display: flex;
    gap: 10px;
}

.priority-option {
    flex: 1;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.priority-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.priority-option.high {
    color: transparent;
    text-shadow: 0 0 0 #dc2626;
}

.priority-option.high.selected {
    border-color: #dc2626;
    background: #fee2e2;
    color: transparent;
    text-shadow: 0 0 0 #dc2626;
}

.priority-option.medium {
    color: transparent;
    text-shadow: 0 0 0 #d97706;
}

.priority-option.medium.selected {
    border-color: #d97706;
    background: #fef3c7;
    color: transparent;
    text-shadow: 0 0 0 #d97706;
}

.priority-option.low {
    color: transparent;
    text-shadow: 0 0 0 #059669;
}

.priority-option.low.selected {
    border-color: #059669;
    background: #d1fae5;
    color: transparent;
    text-shadow: 0 0 0 #059669;
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1;
}

.section-limit {
  display: flex;
  justify-content: center;
}

/* .modal {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.3rem;
  min-height: 250px;
  position: absolute;
  top: 20%;
  z-index: 2;
} */

.hide {
  display: none;
}

.innerModal {
  background: white;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-left: 4px solid #3498db;
  position: relative;
  overflow: hidden;
}

/* input {
  background: white;
  border-radius: 10px;
  padding: 5px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
} */

datalist {
  display: flex;
  justify-content: space-between;
  width: 200px;
}

option {
  padding-bottom: 10px;
}

input[type="range"] {
  width: 200px;
  margin: 0;
}

/* .btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
} */

.btn.btn-cancel {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: rgb(163, 17, 17);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.btn-cancel:hover {
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.btn.btn-submit {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: rgb(60, 90, 7);
    border: 2px solid #b8b8ce;
}

.btn-submit:hover {
    border-style: solid;
    transform: translateY(-2px);
    border: 2px solid #ddddf3;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.header-content {
  display: block ruby;
  text-align: right;
}

.main-buttons-div {
text-align: center;
  display: block ruby;
  margin-top: -73px;
  padding-bottom: 20px;
}

.header-container {
    display: flex;
    justify-content: left;
    align-items: center;
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
}

.header-title {
    cursor: pointer;
}

.toggle-btn {
    margin-left: auto;
    margin-right: 200px;
    padding-top: 10px;
    padding-left: 20px;
    vertical-align: sub;
    cursor: pointer;
    display: flex;
}

.second-header-container {
    justify-content: left;
    align-items: center;
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

.board-elements {
    margin: auto;
    display: block ruby;
    text-align: center;
}

.board-title-area {
    text-align: center;
    display: block ruby;
    margin-top: -73px;
    padding-bottom: 20px;
}

.board-download-area {
      display: block ruby;
}

#boardName {
    color: white;
    font-size: 2.5rem;
}

.main-list-board, ul.submenu {
  display: none;
  cursor: pointer;
  list-style-type: none;
}

label {
  position: relative;
  display: block;
  cursor: pointer;
        padding: 10px 5px;
}

.main-list-board:checked~ul.submenu {
  display: block;
  position: absolute;
  margin-top: -14px;
  margin-left: 5px;
  padding: 10px 5px;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(111, 98, 194, 0.75);
  box-shadow: 0 0 5px 0px black;
  z-index: 2;
}

.main-list-board, li {
    margin: 5px;
}

.shadow-svg {
  filter: drop-shadow( 3px 3px 2px rgba(0, 0, 0, .7));
  vertical-align: bottom;
}

.main-add-task-btn {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.main-add-board, ul.submenu {
  display: none;
  cursor: pointer;
}

.add-board-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    max-width: 150px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    margin-left: auto;
    margin-right: 0px;
    z-index: 2;
}

.add-board-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

label {
  position: relative;
  display: block;
  cursor: pointer;
        padding: 10px 5px;
}

.main-add-board:checked~ul.submenu {
  display: flex;
  position: relative;
  /* margin-top: 55px; */
  margin-left: auto;
  margin-right: 0px;
  padding: 10px 5px;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(111, 98, 194, 0.75);
  box-shadow: 0 0 5px 0px black;
  z-index: 2;
}

.main-add {
  border: 2px solid rgba(255, 255, 255, 0.3);
  max-width: 120px;
}

.down-up-load {
    display: flex;
    gap: 20px;
}

.main-download {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 240px;
    margin-left: auto;
}

.main-download:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.markdown-preview {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.file-input-label:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.buttons-div {
  display: flex;
}

.task-div {
  padding: 10px 20px;
  display: inherit;
}

.modify-task {
    display: flex;
    justify-content: end;
    margin-right: -10px;
    margin-right: 0;
    cursor: pointer;
}

.worked {
    padding-left: 10px;
    padding-right: 10px;
}

.delete-bin {
    color: transparent;
    text-shadow: 0 0 0 red;
    padding-right: 10px;
}

.cancel-link-hidden {
    display: none;
}

.cancel-link {
    display: block;
}

.edit-form {
    padding-right: 10px;
    margin-left: auto;
}

.linked {
    color: transparent;
    text-shadow: 0 0 0 rgb(0, 0, 0);
}

.link-badge {
    cursor: pointer;
}

@media (max-width:900px)  {

    .board-title-area {
        margin-top: 20px;
        text-align: center;
        display: flex;
        padding-bottom: 20px;
    }

    .try-link {
        position: static;
    }

}