/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    direction: rtl;
    min-height: 100vh;
    padding: 20px;
}

.container-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Card Styles */
.card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eaed;
    transition: all 0.3s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.drag-handle {
    cursor: move;
    color: #718096;
    font-size: 20px;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.2s;
}

.drag-handle:hover {
    background-color: #f7fafc;
    color: #4a5568;
}

/* Input and Textarea Styles */
input[type="text"],
input[type="time"],
input[type="number"],
textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s;
    background: #f8fafc;
    color: #2d3748;
}

input[type="text"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: #4299e1;
    background: white;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

/* Time Log Entry Styles */
.time-log-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.time-log-entry:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

.time-log-entry input[type="time"] {
    width: 120px;
    min-width: 120px;
    text-align: center;
    font-family: monospace;
    font-weight: 500;
}

.time-log-entry input[type="text"] {
    flex: 1;
    min-width: 0;
}

.remove-time-btn {
    background: #fed7d7;
    color: #c53030;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 70px;
}

.remove-time-btn:hover {
    background: #feb2b2;
    transform: translateY(-1px);
}

/* Mood Emoji Styles */
.emoji-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 100px;
    text-align: center;
}

.emoji-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.emoji-button.selected {
    border-color: #4299e1;
    background: #ebf8ff;
    box-shadow: 0 8px 20px rgba(66, 153, 225, 0.2);
}

.mood-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.mood-label {
    font-size: 15px;
    font-weight: 600;
    color: #4a5568;
}

/* Small Section Cards */
.small-section-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 18px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
}

.small-section-title {
    font-size: 17px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.small-section-textarea {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    font-size: 15px;
}

/* Dynamic List Items */
.dynamic-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.dynamic-list-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

.remove-btn {
    color: #e53e3e;
    cursor: pointer;
    font-size: 22px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #fed7d7;
    transform: scale(1.1);
}

/* Radio Label Styles */
.radio-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-label:hover {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

.radio-input {
    cursor: pointer;
}

/* Action Buttons */
.screenshot-actions {
    position: fixed;
    bottom: 25px;
    left: 25px;
    display: flex;
    gap: 12px;
    z-index: 100;
}

.screenshot-actions button {
    padding: 14px 24px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
    transition: all 0.3s;
    min-width: 140px;
    text-align: center;
}

.screenshot-actions button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(66, 153, 225, 0.5);
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
}

.screenshot-actions button:active {
    transform: translateY(-1px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-message {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-wrapper {
        padding: 15px;
    }
    
    .card {
        padding: 18px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .emoji-button {
        min-width: 80px;
        padding: 12px;
    }
    
    .mood-icon {
        font-size: 28px;
    }
    
    .screenshot-actions {
        bottom: 15px;
        left: 15px;
        right: 15px;
        justify-content: center;
    }
    
    .screenshot-actions button {
        padding: 12px 18px;
        min-width: 120px;
        font-size: 14px;
    }
    
    .time-log-entry {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .time-log-entry input[type="time"] {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .screenshot-actions {
        flex-wrap: wrap;
    }
    
    .screenshot-actions button {
        min-width: 45%;
        font-size: 13px;
        padding: 10px;
    }
}

/* Sortable.js Styles */
.sortable-ghost {
    opacity: 0.4;
    background: #c6f6d5;
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(3deg);
}

/* Animation for adding new items */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dynamic-list-item,
.time-log-entry,
.checkbox-label {
    animation: fadeIn 0.3s ease-out;
}