/* FlaskyNotes - Modern Styling */

:root {
    --primary-color: #74b9ff;
    --primary-dark: #0984e3;
    --secondary-color: #0984e3;
    --accent-color: #74b9ff;
    --success-color: #4ecdc4;
    --error-color: #ff6b6b;
    --warning-color: #feca57;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navbar Styling */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0 !important; /* Very minimal padding */
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 10000 !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: 56px !important; /* Increased from 50px to 56px */
    min-height: 56px !important;
    max-height: 56px !important;
}

.navbar > .container {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 1rem !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.navbar-nav {
    margin: 0 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 0.25rem;
    padding: 0.25rem 0.5rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 0.85rem;
    line-height: 1 !important;
}

.navbar-nav .nav-link:hover {
    background: var(--primary-color);
    color: white !important;
    transform: translateY(-2px);
}

/* Container and Layout */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* Card Component */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: none;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(20px);
}

.card:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    border: none;
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Form Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
    outline: none;
}

/* Button Styling */
.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color), #ff5252);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* Alert Styling */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, var(--success-color), #26d0ce);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, var(--error-color), #ff5252);
    color: white;
}

.alert .close {
    color: white;
    opacity: 0.8;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
}

.alert .close:hover {
    opacity: 1;
}

/* Notes Styling */
.notes-container {
    margin-top: 2rem;
}

.notes-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    margin-top: 3rem; /* Increased from 2rem to 3rem for more separation */
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: var(--border-radius);
    backdrop-filter: blur(15px);
    border: 3px solid rgba(255, 255, 255, 0.5);
    position: relative !important;
    z-index: 1000 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    isolation: isolate;
}

.notes-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        -1px -1px 2px rgba(0, 0, 0, 0.5),
        1px -1px 2px rgba(0, 0, 0, 0.5),
        -1px 1px 2px rgba(0, 0, 0, 0.5),
        1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
    letter-spacing: -0.02em;
    position: relative !important;
    z-index: 1001 !important;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.3);
    isolation: isolate;
}

.notes-header i {
    font-size: 2rem;
    color: #74b9ff !important;
    margin-right: 1rem;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        -1px -1px 2px rgba(0, 0, 0, 0.5);
    position: relative !important;
    z-index: 1001 !important;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    isolation: isolate;
}

.note-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: none;
    position: relative;
    backdrop-filter: blur(20px);
}

.note-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.note-content {
    margin-right: 3rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.note-delete {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.note-delete:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.note-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-top: 2rem;
    backdrop-filter: blur(20px);
}

.note-form textarea {
    min-height: 120px;
    resize: vertical;
}

.note-form .btn {
    width: 100%;
    margin-top: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.empty-state i {
    font-size: 4rem;
    color: #74b9ff;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.empty-state p {
    font-size: 1.1rem;
    opacity: 0.85;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 4rem auto;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-header h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.auth-body {
    padding: 2rem;
}

.auth-footer {
    text-align: center;
    padding: 1rem 2rem 2rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .notes-header {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .notes-header h1 {
        font-size: 2rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    }
    
    .notes-header i {
        font-size: 1.5rem;
        margin-right: 0.75rem;
    }
    
    .note-item {
        padding: 1rem;
    }
    
    .note-content {
        margin-right: 2.5rem;
        font-size: 1rem;
    }
    
    .note-delete {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    
    .auth-container {
        margin: 2rem auto;
    }
    
    .auth-header {
        padding: 1.5rem;
    }
    
    .auth-header h3 {
        font-size: 1.5rem;
    }
    
    .auth-body {
        padding: 1.5rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Glassmorphism effect for modern look */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Improved focus states for accessibility */
.form-control:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Force notes header to be on top of everything except navbar */
.notes-header,
.notes-header h1,
.notes-header i {
    position: relative !important;
    z-index: 1000 !important;
}

.notes-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    z-index: -1;
}

/* Override any Bootstrap or other framework interference */
.container .notes-header {
    z-index: 1000 !important;
    position: relative !important;
    isolation: isolate !important;
}

.notes-header * {
    z-index: inherit !important;
}
