/* Quest Task Manager Widget Styles */
.qtm-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.qtm-container *,
.qtm-container *::before,
.qtm-container *::after {
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.main-content {
    display: grid;
    gap: 20px;
}

.qtm-container section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.qtm-container h2 {
    margin-bottom: 20px;
    color: #555;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Form Styling */
.qtm-form-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.qtm-container label {
    font-weight: 600;
    min-width: 120px;
    color: #555;
}

.qtm-container input, 
.qtm-container select {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.qtm-container input:focus, 
.qtm-container select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.qtm-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qtm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.qtm-button:active {
    transform: translateY(0);
}

/* Save/Load Section */
.qtm-save-load-section {
    text-align: center;
}

.qtm-save-load-section .qtm-button {
    margin: 0 10px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.qtm-save-load-section .qtm-button:first-child {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

/* Quest Display */
.qtm-quest-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s ease;
}

.qtm-quest-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qtm-quest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.qtm-quest-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.qtm-quest-stats {
    font-size: 0.9rem;
    color: #666;
    background: #e8e8e8;
    padding: 5px 12px;
    border-radius: 20px;
}

.qtm-progress-bar-container {
    background: #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    height: 25px;
    margin-bottom: 10px;
}

.qtm-progress-bar {
    height: 100%;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Quest Colors */
.quest-color-0 { background: linear-gradient(135deg, #FF6B6B, #FF5252); }
.quest-color-1 { background: linear-gradient(135deg, #4ECDC4, #26A69A); }
.quest-color-2 { background: linear-gradient(135deg, #45B7D1, #2196F3); }
.quest-color-3 { background: linear-gradient(135deg, #96CEB4, #4CAF50); }
.quest-color-4 { background: linear-gradient(135deg, #FFEAA7, #FFC107); }
.quest-color-5 { background: linear-gradient(135deg, #DDA0DD, #9C27B0); }
.quest-color-6 { background: linear-gradient(135deg, #FFB347, #FF9800); }
.quest-color-7 { background: linear-gradient(135deg, #87CEEB, #03A9F4); }

/* Tasks Display */
.qtm-task-item {
    background: #f9f9f9;
    border-left: 4px solid #ddd;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 0 6px 6px 0;
    transition: all 0.3s ease;
}

.qtm-task-item.completed {
    background: #e8f5e8;
    border-left-color: #4CAF50;
    opacity: 0.8;
}

.qtm-task-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qtm-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.qtm-task-name {
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 200px;
}

.qtm-task-name.completed {
    text-decoration: line-through;
    color: #888;
}

.qtm-task-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.qtm-task-controls .qtm-button {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
}

.qtm-toggle-task-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
}

.qtm-delete-task-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f) !important;
}

.qtm-delete-quest-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f) !important;
}

.qtm-task-details {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.qtm-task-deadline {
    font-weight: 500;
}

.qtm-task-deadline.overdue {
    color: #d32f2f;
    font-weight: 600;
}

.qtm-task-quest {
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .qtm-container {
        padding: 10px;
    }
    
    .qtm-container h2 {
        font-size: 1.5rem;
    }
    
    .qtm-form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .qtm-container label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .qtm-quest-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .qtm-task-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .qtm-task-controls {
        justify-content: flex-end;
    }
    
    .qtm-task-details {
        flex-direction: column;
        gap: 5px;
    }
}

/* Animations */
@keyframes qtmSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qtm-quest-item, 
.qtm-task-item {
    animation: qtmSlideIn 0.3s ease;
}

/* Success/Error Messages */
.qtm-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.qtm-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.qtm-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}