* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.input-section {
    margin-bottom: 20px;
}

.course-button-top {
    margin-bottom: 10px;
}

.new-course-btn-top {
    width: 100%;
    padding: 15px;
    background-color: #5c9bd1;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.new-course-btn-top:hover {
    opacity: 0.9;
}


.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-card {
    background-color: #424242;
    border-radius: 12px;
    padding: 20px;
    color: white;
    position: relative;
    min-height: 150px;
}

.task-card.completed {
    opacity: 0.8;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.task-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.task-status {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4caf50;
    font-size: 14px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #4caf50;
}

.task-description {
    font-size: 16px;
    margin-bottom: 10px;
    color: #e0e0e0;
}

.task-attachments {
    font-size: 14px;
    color: #bdbdbd;
    margin-bottom: 5px;
    cursor: pointer;
}

.task-attachments:hover {
    color: #fff;
}

.task-due-date {
    font-size: 14px;
    color: #ff9800;
    margin-top: 5px;
    font-weight: 500;
}


.task-checkbox {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    appearance: none;
}

.task-checkbox:checked {
    background-color: #4caf50;
    border-color: #4caf50;
}

.task-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.task-actions {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.task-due-date-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.task-due-date-btn svg {
    width: 20px;
    height: 20px;
}

.task-due-date-btn:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.task-menu {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    line-height: 0.5;
    letter-spacing: -2px;
}

.task-menu:hover {
    opacity: 0.7;
}

.menu-dropdown {
    position: absolute;
    bottom: 35px;
    right: 0;
    background-color: #616161;
    border-radius: 8px;
    padding: 10px 0;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.menu-item {
    padding: 10px 20px;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.menu-item:hover {
    background-color: #757575;
}

.menu-item.delete {
    color: #ff5252;
}

.menu-item.menu-timestamp {
    color: #9e9e9e;
    font-size: 12px;
    padding: 8px 20px;
    cursor: default;
}

.menu-item.menu-timestamp:hover {
    background-color: transparent;
}

.bottom-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0;
    max-width: 400px;
    width: calc(100% - 40px);
}

.bottom-task-input {
    flex: 1;
    padding: 18px;
    border: none;
    border-radius: 12px 0 0 12px;
    background-color: #616161;
    color: white;
    font-size: 16px;
    outline: none;
    margin-right: 0;
}

.bottom-task-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.add-task-btn-icon {
    width: 60px;
    padding: 18px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 0 12px 12px 0;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.add-task-btn-icon:hover {
    opacity: 0.9;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.courses-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 10px;
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.course-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.course-task-count {
    font-size: 14px;
    color: #666;
}

.delete-course-btn {
    padding: 8px 16px;
    background-color: #ff5252;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

.delete-course-btn:hover {
    background-color: #ff1744;
    opacity: 0.9;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    outline: none;
}

.attachment-options {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.attachment-btn {
    flex: 1;
    padding: 12px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.attachment-btn:hover {
    opacity: 0.9;
}

#noteInputWrapper {
    margin-bottom: 20px;
}

.note-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    min-height: 100px;
    resize: vertical;
    margin-bottom: 10px;
    outline: none;
    font-family: inherit;
}

.add-note-action-btn {
    width: 100%;
    padding: 12px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-note-action-btn:hover {
    background-color: #45a049;
}

.add-note-action-btn:active {
    transform: scale(0.98);
}

.attachments-list {
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.attachment-item {
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.attachment-photo-item {
    background-color: #f5f5f5;
}

.attachment-note-item {
    background-color: #fff3cd;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    position: relative;
}

.attachment-item img {
    max-width: 60px;
    max-height: 60px;
    border-radius: 4px;
    margin-right: 10px;
}

.attachment-meta {
    flex: 1;
    font-size: 14px;
    color: #666;
}

.note-content {
    width: 100%;
    font-size: 18px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 8px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.note-meta {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.attachment-item .remove-attachment {
    background: none;
    border: none;
    color: #ff5252;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    position: absolute;
    top: 10px;
    right: 10px;
}

.attachment-photo-item .remove-attachment {
    position: static;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-buttons .save-btn:only-child {
    margin-left: auto;
    margin-right: auto;
}

.cancel-btn,
.save-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.cancel-btn {
    background-color: #e0e0e0;
    color: #333;
}

.save-btn {
    background-color: #2196f3;
    color: white;
}

.cancel-btn:hover,
.save-btn:hover {
    opacity: 0.9;
}

/* Alert and Confirm Modal Styles */
.alert-modal-content,
.confirm-modal-content {
    text-align: center;
}

.alert-modal-content p,
.confirm-modal-content p {
    margin: 20px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.confirm-delete-btn {
    background-color: #ff5252;
}

.confirm-delete-btn:hover {
    background-color: #ff1744;
}

/* Fullscreen Photo Modal */
.photo-modal {
    background-color: rgba(0, 0, 0, 0.95);
}

.photo-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.close-photo-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.2s;
}

.close-photo-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.attachment-item img {
    cursor: pointer;
    transition: opacity 0.2s;
}

.attachment-item img:hover {
    opacity: 0.8;
}

/* Course Selection Modal */
.course-select-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.course-select-item {
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.course-select-item:hover {
    background-color: #e0e0e0;
}

.course-select-item:active {
    background-color: #bdbdbd;
}

.course-select-item-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

