* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 25px 35px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.header:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.header-left i {
    font-size: 2rem;
    color: #4f46e5;
}

.header-left h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    gap: 12px;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #4a5568;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex-shrink: 0;
}

.filters-search-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex: 1;
}

/* Search Bar Styles */
.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 30px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    width: 250px;
    flex-shrink: 0;
}

.search-container:focus-within {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
    background: white;
}

.search-icon {
    color: #9ca3af;
    font-size: 14px;
    margin-right: 8px;
    flex-shrink: 0;
}

.search-box {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    color: #1f2937;
    flex: 1;
    font-family: inherit;
    min-width: 0;
}

.search-box::placeholder {
    color: #9ca3af;
}

.clear-search-btn {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-left: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.clear-search-btn:hover {
    color: #ef4444;
    transform: scale(1.1);
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.8);
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Responsive notes grid */
@media (max-width: 768px) {
    .notes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-search-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .search-container {
        width: 100%;
    }

    .category-filters {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .notes-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px 0;
    }

    .filters-search-wrapper {
        flex-direction: column;
        width: 100%;
    }

    .search-container {
        width: 100%;
    }

    .search-box {
        font-size: 13px;
    }

    .section-header h2 {
        font-size: 20px;
    }
}

/* Note Card */
.note-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.note-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 5px;
}

.note-category {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
    margin-right: 15px;
}

.category-website {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.category-facebook {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.category-gmail {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.category-instagram {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.category-general {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}


.email-section {
    margin-bottom: 15px;
}

.email-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
    display: block;
}

.email-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.email-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
    word-break: break-all;
}

.password-section {
    margin-bottom: 20px;
}

.password-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 5px;
    display: block;
}

.password-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.password-text {
    flex: 1;
    font-family: monospace;
    font-size: 14px;
    color: #374151;
}

.password-actions {
    display: flex;
    gap: 5px;
}

.icon-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.note-actions {
    display: flex;
    gap: 10px;
}

.edit-btn {
    background: #f3f4f6;
    color: #374151;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.edit-btn:hover {
    background: #e5e7eb;
}

.delete-btn {
    background: #fef2f2;
    color: #dc2626;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.delete-btn:hover {
    background: #fee2e2;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #d1d5db;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #374151;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.modal-header h3 {
    color: #2d3748;
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.15);
}

/* Form Styles */
#noteForm {
    padding: 0;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.025em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(203, 213, 225, 0.6);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1f2937;
    box-sizing: border-box;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.08),
        0 4px 12px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

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

.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    padding-right: 60px;
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(203, 213, 225, 0.4);
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
}

.modal-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid rgba(203, 213, 225, 0.3);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    color: #333;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 10000;
    font-weight: 500;
    max-width: 350px;
    word-wrap: break-word;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.toast.info {
    background: rgba(59, 130, 246, 0.95);
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #667eea;
}

.loading-spinner p {
    font-size: 18px;
    font-weight: 500;
}

/* Auth Section */
.auth-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
}

.user-email {
    color: #333;
    font-weight: 600;
    margin-right: 15px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: clamp(12px, 2.5vw, 14px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(203, 213, 225, 0.3);
    position: relative;
}

.auth-switch::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1px;
}

.auth-switch p {
    color: #64748b;
    margin: 0;
    font-size: 15px;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.auth-switch a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.auth-switch a:hover {
    color: #764ba2;
    transform: translateY(-1px);
}

.auth-switch a:hover::after {
    width: 100%;
}

/* Admin Note Styles */
.admin-note {
    border-left: 5px solid #fbbf24;
    border: 2px solid #f97316;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(245, 158, 11, 0.12) 100%);
    position: relative;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.admin-note::before {
    content: "👑";
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 18px;
    opacity: 0.8;
}

.admin-note .note-title {
    color: #92400e;
    font-weight: 600;
}

.admin-note .note-creator {
    color: #d97706;
    font-weight: 500;
    font-size: 13px;
    margin-top: 8px;
}

.admin-note .note-email {
    color: #92400e;
}

/* Remove duplicate admin badges and text */
.admin-note .admin-badge {
    display: none;
}

.admin-note .note-meta .admin-text {
    display: none;
}

.admin-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.25);
    border-color: #ea580c;
}

/* Admin notes responsive design */
@media (max-width: 768px) {
    .admin-note {
        border: 2px solid #f97316;
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .admin-note::before {
        top: 12px;
        right: 12px;
        font-size: 16px;
    }
    
    .admin-note .note-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .admin-note .note-content {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .admin-note .note-meta {
        font-size: 12px;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .admin-note {
        border: 2px solid #f97316;
        padding: 12px;
        margin-bottom: 10px;
        border-radius: 12px;
    }
    
    .admin-note::before {
        top: 10px;
        right: 10px;
        font-size: 14px;
    }
    
    .admin-note .note-title {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .admin-note .note-content {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .admin-note .note-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }
    
    .admin-note .note-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.admin-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
}

.note-creator {
    color: #92400e;
    font-size: 12px;
    font-style: italic;
    margin-bottom: 10px;
}

.read-only-note {
    color: #6b7280;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-style: italic;
}

/* Admin Panel Styles */
.btn-admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 20px);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(12px, 2.5vw, 14px);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

.admin-modal-content {
    max-width: 800px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
}

.admin-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
}

.admin-tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.admin-tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.admin-tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.admin-tab-content {
    animation: fadeIn 0.3s ease;
}

.admin-section {
    margin-bottom: 30px;
}

.admin-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.users-list {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 20px;
    min-height: 200px;
}

.loading-users {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #666;
    font-weight: 500;
    padding: 40px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(103, 126, 234, 0.3);
    transform: translateY(-1px);
}

.user-info {
    flex: 1;
}

.user-email {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.user-role {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.user-role span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.admin-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-badge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-protected {
    padding: 4px 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.users-header h4 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.form-group label input[type="checkbox"] {
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header {
        padding: 15px 20px;
    }
    
    .header-buttons {
        gap: 8px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .note-card {
        padding: 20px;
    }
    
    .container {
        padding: 15px;
    }
    
    .notes-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .admin-modal-content {
        width: 95vw;
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .header-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .user-email {
        max-width: 200px;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 120px;
    }
    
    .note-card {
        padding: 16px;
        margin-bottom: 15px;
    }
    
    .note-title {
        font-size: 18px;
    }
    
    .note-content {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .btn-admin {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .category-filters {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .filter-btn {
        white-space: nowrap;
        min-width: auto;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .note-card {
        padding: 20px;
    }
    
    .modal-content {
        margin: 15px;
        width: calc(100% - 30px);
        padding: 30px 25px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    .modal-header {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }
    
    .modal-actions {
        margin-top: 24px;
        gap: 12px;
    }
    
    .admin-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        padding: 25px 20px;
        max-height: 95vh;
    }
    
    .modal-header h3 {
        font-size: 24px;
    }
    
    .admin-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .admin-tab-btn {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
    }
    
    .admin-tab-btn:first-child {
        border-radius: 12px 12px 0 0;
    }
    
    .admin-tab-btn:last-child {
        border-radius: 0 0 12px 12px;
        border-bottom: none;
    }
    
    .admin-tab-btn.active {
        border-bottom-color: transparent;
        background: rgba(102, 126, 234, 0.1);
    }
    
    .users-list {
        padding: 15px;
    }
    
    .user-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .user-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .form-group input,
    .form-group select {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .password-input input {
        padding-right: 55px;
    }
    
    .toggle-password {
        right: 12px;
        width: 32px;
        height: 32px;
    }
    
    .modal-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .auth-section {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .header {
        padding: 15px;
        gap: 15px;
    }
    
    .logo {
        width: 35px;
        height: 35px;
    }
    
    .header-left h1 {
        font-size: clamp(18px, 5vw, 22px);
    }
    
    .user-email {
        max-width: 150px;
        margin-right: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 4px;
    }
    
    .btn i {
        font-size: 12px;
    }
    
    .btn-admin {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        padding: 25px 20px;
    }
    
    .admin-modal-content {
        margin: 5px;
        width: calc(100% - 10px);
        padding: 20px 15px;
    }
    
    .modal-header h3 {
        font-size: 22px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .modal-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .modal-actions {
        margin-top: 20px;
        gap: 10px;
        flex-direction: column-reverse;
    }
    
    .modal-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 14px;
        font-size: 16px;
    }
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    padding: 20px 0;
    margin-top: 40px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    color: #ffffff;
    font-size: 14px;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Footer responsive design */
@media (max-width: 768px) {
    .footer {
        padding: 16px 0;
        margin-top: 30px;
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    .footer-content p {
        font-size: 13px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 12px 0;
        margin-top: 20px;
    }
    
    .footer-content p {
        font-size: 12px;
        padding: 0 10px;
    }
}

/* Additional mobile styles */
@media (max-width: 360px) {
    .note-card {
        padding: 15px;
    }
    
    .note-title {
        font-size: 16px;
    }
    
    .category-filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .filter-btn,
    .admin-tab-btn,
    .toggle-password,
    .close-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .note-actions .btn {
        padding: 10px 15px;
    }
    
    .icon-btn {
        min-width: 40px;
        min-height: 40px;
    }
}

/* Enhanced mobile responsiveness */
@media (max-width: 576px) {
    /* Header improvements for very small screens */
    .header-left h1 {
        font-size: 20px;
    }
    
    .logo {
        width: 35px;
        height: 35px;
    }
    
    /* Modal improvements for mobile */
    .modal-content {
        margin: 10px;
        padding: 20px;
        max-width: calc(100vw - 20px);
        border-radius: 16px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    /* Form improvements */
    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }
    
    /* Category filters horizontal scroll */
    .category-filters {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 8px;
    }
    
    .category-filters::-webkit-scrollbar {
        display: none;
    }
    
    /* Note card touch improvements */
    .note-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .note-title {
        font-size: 16px;
        line-height: 1.4;
    }
    
    .note-email {
        font-size: 13px;
    }
    
    /* Password input mobile optimization */
    .password-input {
        position: relative;
    }
    
    .password-input input {
        padding-right: 50px;
    }
    
    .toggle-password {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        min-width: 40px;
        min-height: 40px;
    }
}

/* Landscape phone orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .header {
        padding: 12px 20px;
    }
    
    .container {
        padding: 10px;
    }
}

/* Tablet portrait specific styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .notes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .modal-content {
        max-width: 600px;
    }
}

/* Improved touch targets for accessibility */
@media (max-width: 768px) {
    .copy-btn,
    .edit-btn,
    .delete-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 8px;
    }
    
    .filter-btn {
        min-height: 40px;
        padding: 8px 16px;
        white-space: nowrap;
    }
    
    /* Improved spacing for mobile */
    .note-actions {
        gap: 8px;
        margin-top: 12px;
    }
}
