/* Admin Interface Styles */

.admin-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.admin-header {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.admin-header h3 {
    color: #ff6b6b;
    margin-bottom: 8px;
    font-size: 1.5em;
}

.unsaved-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.9em;
    display: inline-block;
}

/* Section Tabs */
.section-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.section-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #c0c0c0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.section-tab.active {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.section-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

/* Admin Sections */
.admin-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-section h4 {
    color: #daa520;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid rgba(218, 165, 32, 0.3);
    padding-bottom: 8px;
}

.admin-section h5 {
    color: #ff6b6b;
    margin-bottom: 12px;
    margin-top: 20px;
    font-size: 1.1em;
}

.admin-section h6 {
    color: #daa520;
    margin-bottom: 8px;
    font-size: 1em;
}

/* Sefirot List */
.sefirot-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.sefirah-item {
    background: rgba(218, 165, 32, 0.1);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sefirah-item:hover {
    background: rgba(218, 165, 32, 0.2);
    border-color: #daa520;
    transform: translateY(-2px);
}

.edit-icon {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.sefirah-item:hover .edit-icon {
    opacity: 1;
}

/* Edit Form */
.sefirah-edit-form {
    background: rgba(255, 107, 107, 0.05);
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.sefirah-edit-form h5 {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #daa520;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #daa520;
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: #daa520;
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary:hover {
    background: #b8941c;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #c0c0c0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-warning:hover {
    background: #d97706;
}

/* Citation Tools */
.citation-tools {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.add-citation {
    display: grid;
    gap: 15px;
}

.add-citation select,
.add-citation input,
.add-citation textarea {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px;
    border-radius: 6px;
}

.add-citation button {
    justify-self: start;
    min-width: 150px;
}

/* Citations Display */
.existing-citations {
    margin-top: 25px;
}

.citations-group {
    background: rgba(218, 165, 32, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #daa520;
}

.citations-group h6 {
    color: #daa520;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.citation-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
}

.citation-item:last-child {
    margin-bottom: 0;
}

/* Export Tools */
.export-tools {
    display: grid;
    gap: 25px;
}

.export-section,
.backup-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.export-section p,
.backup-section p {
    color: #c0c0c0;
    margin-bottom: 15px;
    line-height: 1.5;
}

#last-backup {
    color: #daa520;
    font-weight: bold;
}

/* Admin Tab Styling */
.admin-tab {
    position: relative;
}

.admin-tab::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-tab.active::before {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-tabs {
        flex-wrap: wrap;
    }
    
    .section-tab {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .sefirot-list {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .admin-section {
        padding: 15px;
    }
    
    .sefirah-edit-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .admin-header {
        padding: 15px;
    }
    
    .admin-header h3 {
        font-size: 1.3em;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-warning {
        padding: 14px 20px;
        font-size: 16px;
        width: 100%;
    }
}

/* Animation for smooth transitions */
.admin-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success/Error message styling */
.admin-message {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}