:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --background-color: #f5f5f5;
    --text-color: #333;
    --completed-color: #888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #fbc427;
    color: var(--text-color);
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Иконка администратора */
.admin-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(33, 150, 243, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}

.admin-icon i {
    font-size: 20px;
}

.admin-icon:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: rotate(30deg);
}

.instructions {
    background-color: rgba(33, 150, 243, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.instructions p {
    margin: 5px 0;
    font-size: 14px;
    color: #444;
}

.instructions strong {
    color: #000;
    background-color: #e9f5fe;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Empty state */
.empty-list {
    text-align: center;
    padding: 40px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    color: #666;
}

.admin-link {
    text-align: center;
    margin-top: 10px;
}

.admin-link a {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.admin-link a:hover {
    background-color: #1976D2;
}

/* Task Items */
.task-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    touch-action: pan-y;
    -webkit-user-select: none;
    min-height: 56px;
}

.touch-device .task-item::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23cccccc'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.3;
}

.task-item.completed::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23cccccc'%3E%3Cpath d='M19 12H5M12 19l-7-7 7-7'/%3E%3C/svg%3E");
}

.task-item.touch-active {
    background-color: #f0f0f0;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 3px;
    background-color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-item.completed::before {
    opacity: 1;
}

.task-item.completed {
    background-color: #f9f9f9;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--completed-color);
}

.task-text {
    flex-grow: 1;
    padding: 8px 0;
    transition: all 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

/* Swipe Indicators */
.swipe-indicator {
    position: absolute;
    top: 0;
    height: 100%;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
    pointer-events: none;
}

.swipe-indicator.right {
    right: 0;
    background: linear-gradient(to left, rgba(76, 175, 80, 0.2), transparent);
    color: var(--primary-color);
}

.swipe-indicator.left {
    left: 0;
    background: linear-gradient(to right, rgba(255, 152, 0, 0.2), transparent);
    color: #FF9800;
}

.swipe-indicator span {
    font-size: 24px;
    font-weight: bold;
}

/* Animations */
@keyframes complete {
    from { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(30px); opacity: 0.8; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes uncomplete {
    from { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(-30px); opacity: 0.8; }
    to { transform: translateX(0); opacity: 1; }
}

.completing {
    animation: complete 0.6s ease-in-out;
}

.uncompleting {
    animation: uncomplete 0.6s ease-in-out;
}

/* Swipe Guide */
.swipe-guide {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    z-index: 1000;
    display: none;
}

.swipe-guide.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Admin Styles */
.admin-task-item {
    background: white;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.admin-task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.navigation {
    margin-top: 10px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.home-link {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.2);
}

.home-link:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

.delete-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.2);
}

.delete-btn:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

.add-task-form {
    margin-bottom: 30px;
    display: flex;
    gap: 12px;
}

.add-task-form input[type="text"] {
    flex-grow: 1;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.add-task-form input[type="text"]:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.15);
    outline: none;
}

.add-task-form button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.2);
    white-space: nowrap;
}

.add-task-form button:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .task-item {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .task-text {
        font-size: 16px;
    }
    
    .instructions {
        font-size: 13px;
    }
    
    .add-task-form {
        flex-direction: column;
    }
    
    .add-task-form button {
        width: 100%;
    }
    
    .admin-icon {
        top: 5px;
        right: 5px;
        width: 36px;
        height: 36px;
    }
    
    .admin-icon i {
        font-size: 18px;
    }
}

/* Иконка домашней страницы */
.home-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background-color: rgba(33, 150, 243, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}

.home-icon i {
    font-size: 20px;
}

.home-icon:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: scale(1.1);
}

/* Стили для страницы логина */
.login-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    padding: 35px;
    max-width: 600px;
    width: 90%;
    margin: 20px auto;
    position: relative;
    transition: transform 0.3s ease;
}

.login-container:hover {
    transform: translateY(-3px);
}

.login-icon {
    text-align: center;
    margin-bottom: 15px;
}

.login-icon i {
    font-size: 50px;
    color: var(--secondary-color);
    background-color: rgba(33, 150, 243, 0.1);
    width: 90px;
    height: 90px;
    line-height: 90px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.login-container:hover .login-icon i {
    transform: rotate(10deg);
    background-color: rgba(33, 150, 243, 0.2);
}

.login-container h2 {
    margin-bottom: 25px;
    text-align: center;
    color: var(--secondary-color);
    font-size: 24px;
    font-weight: 600;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #444;
    font-size: 16px;
}

.login-form label i {
    margin-right: 8px;
    color: var(--secondary-color);
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    width: 100%;
}

.password-field:focus-within {
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.15);
    border-color: var(--secondary-color);
}

.password-field input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    outline: none;
    width: 100%;
}

.password-field input::placeholder {
    color: #aaa;
}

.toggle-password {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 10px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--secondary-color);
}

.login-btn {
    display: block;
    width: 100%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.login-btn i {
    margin-right: 10px;
    font-size: 18px;
}

.login-btn:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.4);
}

.login-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.1);
}

.error-message i {
    margin-right: 10px;
    font-size: 18px;
    color: #f44336;
}

.back-to-home {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.back-to-home a {
    color: #555;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.back-to-home a i {
    margin-right: 8px;
    font-size: 14px;
}

.back-to-home a:hover {
    color: var(--secondary-color);
}

/* Стили для кнопки выхода */
.logout-link {
    display: inline-block;
    background-color: #f44336;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.logout-link:hover {
    background-color: #d32f2f;
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 600px) {
    .login-container {
        padding: 25px;
        margin: 15px;
        border-radius: 10px;
    }
    
    .login-icon i {
        font-size: 40px;
        width: 70px;
        height: 70px;
        line-height: 70px;
    }
    
    .password-field input {
        padding: 12px 14px;
    }
    
    .login-btn {
        padding: 12px 14px;
    }
    
    .home-icon, .admin-icon {
        top: 5px;
        right: 5px;
        width: 36px;
        height: 36px;
    }
    
    .home-icon i, .admin-icon i {
        font-size: 18px;
    }
}

/* Styles for tabs */
.tabs-navigation {
    margin-bottom: 20px;
}

.tabs-header {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-header {
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    margin-right: 5px;
    background-color: #f2f2f2;
    border: 1px solid #ddd;
    border-bottom: none;
    transition: all 0.3s ease;
    position: relative;
    top: 1px;
}

.tab-header.active {
    background-color: white;
    border-bottom: 1px solid white;
    font-weight: bold;
    color: var(--secondary-color);
}

.tab-header:hover {
    background-color: #e9e9e9;
}

.tab-content {
    display: none;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 0 6px 6px 6px;
    background-color: white;
}

.tab-content.active {
    display: block;
}

/* Tab section styles */
.tab-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #ddd;
}

.tab-section h2, .tasks-section h2 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.tabs-list {
    margin-top: 20px;
}

.tab-item {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: move;
    transition: all 0.3s ease;
}

.tab-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tab-handle {
    margin-right: 15px;
    color: #888;
    cursor: move;
}

.tab-handle i {
    font-size: 18px;
}

.tab-title {
    flex-grow: 1;
    font-weight: 500;
}

.tab-actions {
    display: flex;
    gap: 10px;
}

.task-handle {
    margin-right: 15px;
    color: #888;
    cursor: move;
}

.task-handle i {
    font-size: 18px;
}

.delete-form {
    display: inline;
}

/* Form for adding tabs */
.add-form {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.add-form input[type="text"] {
    flex-grow: 1;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.add-form input[type="text"]:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.15);
    outline: none;
}

.add-form button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.2);
    white-space: nowrap;
}

.add-form button:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

/* Sortable placeholder */
.ui-sortable-placeholder {
    visibility: visible !important;
    background-color: rgba(33, 150, 243, 0.1) !important;
    border: 2px dashed var(--secondary-color) !important;
    border-radius: 6px;
    margin-bottom: 10px;
    height: 60px;
    box-shadow: none !important;
}

/* Sortable helper */
.ui-sortable-helper {
    background-color: white;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15) !important;
    opacity: 0.9;
    transform: rotate(1deg);
    z-index: 1000;
}

/* Responsive styles for tabs */
@media (max-width: 600px) {
    .tabs-header {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-header {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .tab-content {
        padding: 10px;
    }
    
    .tab-item, .admin-task-item {
        padding: 10px 12px;
    }
    
    .tab-handle i, .task-handle i {
        font-size: 16px;
    }
    
    .add-form, .add-task-form {
        flex-direction: column;
    }
    
    .add-form button, .add-task-form button {
        width: 100%;
    }
}

/* Categories and Tabs */
.categories-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

.category-tab {
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 5px;
    margin-bottom: 5px;
    background-color: #f2f2f2;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e0e0e0;
}

.category-tab i {
    font-size: 16px;
    color: #666;
    transition: all 0.3s ease;
}

.category-tab.active {
    background-color: #fbc427;
    color: #222;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-color: #f0b000;
}

.category-tab.active i {
    color: #222;
}

.category-tab:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.category-tab.active:hover {
    background-color: #fbc427;
}

.category-content {
    display: none;
    margin-bottom: 20px;
}

.category-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.category-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.category-title i {
    font-size: 18px;
    color: #fbc427;
}

.category-title h2, .category-title h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

@media (max-width: 600px) {
    .categories-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-tab {
        white-space: nowrap;
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .category-title h2, .category-title h3 {
        font-size: 18px;
    }
} 