:root {
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #000000;
    --tg-theme-hint-color: #999999;
    --tg-theme-link-color: #2481cc;
    --tg-theme-button-color: #2481cc;
    --tg-theme-button-text-color: #ffffff;
    --item-bg-color: rgba(0,0,0,0.03);
    --modal-overlay: rgba(0,0,0,0.5);
    --border-color: rgba(0,0,0,0.1);
}

[class="dark"] {
    --tg-theme-bg-color: #1f1f1f;
    --tg-theme-text-color: #ffffff;
    --tg-theme-hint-color: #aaaaaa;
    --item-bg-color: rgba(255,255,255,0.05);
    --modal-overlay: rgba(0,0,0,0.7);
    --border-color: rgba(255,255,255,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--tg-theme-bg-color) !important;
    color: var(--tg-theme-text-color) !important;
    height: 100vh;
    height: calc(var(--tg-viewport-height, 100vh));
    overflow-y: hidden;
}

.header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.add-button {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    border: none;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    font-size: 24px;
    cursor: pointer;
}

.reminder-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    padding-bottom: 80px;
}

.completed-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    opacity: 0.6;
}

.completed-section .reminder-title {
    text-decoration: line-through;
}

.completed-header {
    font-size: 15px;
    color: var(--tg-theme-hint-color);
    margin-bottom: 8px;
}

.reminder-item {
    padding: 12px 16px;
    background: var(--item-bg-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.reminder-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--tg-theme-button-color);
    flex-shrink: 0;
}

.reminder-info {
    flex: 1;
    cursor: pointer;
}

.reminder-title {
    font-weight: 500;
    margin-bottom: 4px;
}

.reminder-date {
    font-size: 14px;
    color: var(--tg-theme-hint-color);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tg-theme-bg-color);
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
    height: 100vh;
    height: calc(var(--tg-viewport-height, 100vh));
}

.modal-content {
    position: relative;
    height: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

.modal-content h2 {
    margin: 0;
    padding: 16px 0;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

#modalReminderTitle {
    margin-top: 32px;
    font-size: 24px;
    padding: 16px;
    border: none;
    background: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
    color: var(--tg-theme-text-color);
}

#modalDateTime {
    margin-top: 24px;
    font-size: 18px;
    padding: 16px;
    border: none;
    background: var(--item-bg-color);
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    color: var(--tg-theme-text-color);
}

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    background: var(--tg-theme-bg-color) !important;
    color: var(--tg-theme-text-color) !important;
}

.modal-buttons {
    display: none;
}

.button-primary, .button-secondary {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.button-primary {
    background: var(--tg-theme-button-color) !important;
    color: var(--tg-theme-button-text-color) !important;
}

.button-secondary {
    background: rgba(0,0,0,0.05);
    color: var(--tg-theme-text-color) !important;
}

.delete-btn {
    background: none;
    border: none;
    color: var(--tg-theme-hint-color);
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    opacity: 0.7;
}

.delete-btn:hover {
    opacity: 1;
}

@media screen and (max-height: 600px) {
    .modal-content {
        max-height: var(--tg-viewport-height, 100vh);
        height: var(--tg-viewport-height, 100vh);
        border-radius: 0;
    }
}

.add-icon {
    color: var(--tg-theme-button-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
}

#reminderTitle {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font-size: 17px;
    flex: 1;
    color: var(--tg-theme-text-color);
}

#reminderTitle:focus {
    outline: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reminder-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.date-button {
    background: none;
    border: none;
    color: var(--tg-theme-button-color);
    padding: 8px;
    cursor: pointer;
    font-size: 20px;
}

.version-tag {
    text-align: center;
    margin: 0 auto;
    padding-bottom: 10px;
    font-size: 10px;
    opacity: 0.6;
    color: var(--tg-theme-text-color);
}

#app {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding-bottom: 80px;
}

.fab {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--tg-theme-button-color);
    color: var(--tg-theme-button-text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 100;
}

.fab:active {
    transform: scale(0.95);
}
 