/* ============================================
   MODERN AESTHETIC FLASK CRUD APP STYLES
   ============================================ */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100vh;
    position: relative;
}

/* === ANIMATED BACKGROUND === */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8b5cf6, transparent);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #3b82f6, transparent);
    bottom: -10%;
    right: -10%;
    animation-delay: 7s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #ec4899, transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -50px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.9);
    }

    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

/* === PARTICLE CANVAS === */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* === MAIN WRAPPER === */
.main-wrapper {
    position: relative;
    z-index: 1;
}

/* === GLASSMORPHIC NAVBAR === */
.glass-navbar {
    background: rgba(15, 15, 25, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding: 1.2rem 0;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.logo-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8));
    }
}

.logo-text {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6, #ec4899);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.nav-accent {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
    position: absolute;
    bottom: -12px;
    left: 0;
    animation: slide 3s infinite;
}

@keyframes slide {

    0%,
    100% {
        left: 0;
    }

    50% {
        left: calc(100% - 100px);
    }
}

/* === CONTENT CONTAINER === */
.content-container {
    max-width: 1200px;
    padding-bottom: 3rem;
}

/* === GLASSMORPHIC CARDS === */
.glass-card {
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.6s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow:
        0 16px 48px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* === CARD HEADER === */
.card-header {
    margin-bottom: 1.5rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.title-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
}

.title-underline {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* === MODERN FORM === */
.modern-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1.5rem;
    align-items: end;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #a0a0b0;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(10, 10, 20, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(160, 160, 176, 0.5);
}

.form-input:focus {
    background: rgba(10, 10, 20, 0.8);
    border-color: #8b5cf6;
    box-shadow:
        0 0 0 3px rgba(139, 92, 246, 0.1),
        0 0 20px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* === GRADIENT BUTTONS === */
.btn-gradient {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-gradient:hover::before {
    opacity: 1;
}

.btn-add {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
}

.btn-add:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-add:active {
    transform: translateY(-1px);
}

.btn-update {
    background: linear-gradient(135deg, #10b981, #059669);
}

.btn-update:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.btn-gradient:hover .btn-icon {
    transform: translateX(3px);
}

/* === TABLE STYLES === */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead {
    background: rgba(139, 92, 246, 0.1);
}

.modern-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: #8b5cf6;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.modern-table th:first-child {
    border-top-left-radius: 12px;
}

.modern-table th:last-child {
    border-top-right-radius: 12px;
}

.table-row {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.table-row:hover {
    background: rgba(139, 92, 246, 0.05);
    transform: scale(1.01);
}

.modern-table td {
    padding: 1.2rem 1.5rem;
    color: #e0e0e0;
}

.user-name {
    font-weight: 500;
    font-size: 1rem;
}

.user-email {
    color: #a0a0b0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* === ACTION BUTTONS === */
.action-buttons {
    display: flex;
    gap: 0.8rem;
}

.btn-action {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-edit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border-color: rgba(245, 158, 11, 0.3);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
    color: #fff;
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
    color: #fff;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-text {
    color: #a0a0b0;
    font-size: 1.1rem;
}

/* === BACK LINK === */
.back-link-wrapper {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.back-link:hover {
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.1);
    transform: translateX(-5px);
}

.back-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.back-link:hover .back-icon {
    transform: translateX(-3px);
}

/* === ANIMATIONS === */
.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 10, 20, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #3b82f6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a78bfa, #60a5fa);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .glass-navbar {
        padding: 1rem 0;
    }

    .brand-logo {
        font-size: 1.2rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }

    .modern-table {
        font-size: 0.9rem;
    }

    .modern-table th,
    .modern-table td {
        padding: 0.8rem;
    }
}