/* Import Google Font 'Poppins' */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* =========================================
   THE BLURRED ORBS MESH GRADIENT (DISTINCT HUES)
   ========================================= */

html {
    /* Very deep navy base */
    background-color: #020813; 
    min-height: 100vh;
    overflow-x: hidden;
}

/* Base setup for all 4 floating clouds */
/* The blur(120px) completely melts the edges, removing all sharp lines */
html::before, html::after, body::before, body::after {
    content: "";
    position: fixed;
    border-radius: 50%; 
    filter: blur(120px); 
    z-index: -2; 
    pointer-events: none;
    opacity: 0.85; 
}

/* Orb 1: Bright Royal Blue (Starts Top Left) */
html::before {
    top: -10%; left: -10%;
    width: 55vw; height: 55vh;
    background-color: #1A66FF;
    animation: float1 22s infinite alternate ease-in-out;
}

/* Orb 2: True Mint Green (Starts Bottom Right) */
html::after {
    bottom: -10%; right: -10%;
    width: 65vw; height: 65vh;
    background-color: #00FA9A;
    animation: float2 28s infinite alternate-reverse ease-in-out;
}

/* Orb 3: Deep Viridian (Starts Bottom Left) */
body::before {
    bottom: 10%; left: -10%;
    width: 50vw; height: 50vh;
    background-color: #107E57;
    animation: float3 25s infinite alternate ease-in-out;
}

/* Orb 4: Deep Ocean Blue (Starts Top Right) */
body::after {
    top: 10%; right: -10%;
    width: 60vw; height: 60vh;
    background-color: #0D3B8E;
    animation: float4 30s infinite alternate-reverse ease-in-out;
}

/* Animations to make them float around organically */
@keyframes float1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30vw, 30vh) scale(1.3); }
}
@keyframes float2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30vw, -30vh) scale(1.2); }
}
@keyframes float3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40vw, -20vh) scale(1.4); }
}
@keyframes float4 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40vw, 20vh) scale(1.1); }
}

/* Basic reset and font setup for the body */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    color: #333;
    
    /* Adds the subtle camera grain/noise */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    background-color: transparent;
}

/* =========================================
   CONTAINERS & UI ELEMENTS
   ========================================= */

/* Enhanced card-style containers */
.container {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    animation: slideUp 0.6s ease-out;
}

.biodata-container {
    max-width: 700px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography */
h1, h2, h3 {
    color: #005461;
    text-align: center;
    margin-top: 0;
}

h1 { font-weight: 700; }
h2 { font-weight: 600; margin-bottom: 25px; }

/* Form styling & Focus Animations */
form { display: flex; flex-direction: column; }

label { 
    margin-top: 15px; 
    font-weight: 500; 
    color: #0C7779;
    font-size: 0.9rem;
}

input { 
    padding: 12px 15px; 
    margin-top: 8px; 
    border: 2px solid #e1e8ed; 
    border-radius: 10px; 
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
}

input:focus {
    border-color: #00F5D4;
    box-shadow: 0 0 0 4px rgba(0, 245, 212, 0.2);
    outline: none;
    background-color: #ffffff;
}

/* Gradient buttons with 3D hover effects */
button { 
    margin-top: 30px; 
    padding: 14px; 
    background: linear-gradient(135deg, #0C7779, #249E94); 
    color: white; 
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    border: none; 
    border-radius: 10px; 
    cursor: pointer; 
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(12, 119, 121, 0.3);
}

button:hover { 
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(36, 158, 148, 0.5);
    background: linear-gradient(135deg, #249E94, #00F5D4); 
    color: #001a1f;
}

button:active {
    transform: translateY(1px);
}

/* Links */
.nav-link { 
    margin-top: 25px; 
    text-align: center; 
    display: block; 
    text-decoration: none; 
    color: #249E94; 
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link:hover { color: #005461; }

/* Alert messages */
.alert, .success { 
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 20px;
}

.alert { 
    background-color: #fff0f0;
    color: #d32f2f; 
    border-left: 4px solid #d32f2f;
}

.success { 
    background-color: #f0fdf4;
    color: #1b5e20; 
    border-left: 4px solid #00F5D4;
}

.alert h5 {
    margin: 10px 0 0 0;
    color: #555;
    font-weight: normal;
}

/* Profile Picture with Glowing Pulse Effect */
.profile-section {
    text-align: center;
    margin: 25px 0;
}

.profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 0 0 4px #00F5D4;
    animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(0, 245, 212, 0.7), 0 5px 15px rgba(0,0,0,0.2); }
    70% { box-shadow: 0 0 0 15px rgba(0, 245, 212, 0), 0 5px 15px rgba(0,0,0,0.2); }
    100% { box-shadow: 0 0 0 0 rgba(0, 245, 212, 0), 0 5px 15px rgba(0,0,0,0.2); }
}

/* Biodata specific styling */
.biodata-container hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #249E94, transparent);
    margin: 30px 0;
}

.biodata-container h3 {
    text-align: left;
    color: #0C7779;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.biodata-container p {
    background: rgba(244, 248, 247, 0.7);
    padding: 12px 15px;
    border-radius: 8px;
    margin: 8px 0;
    border-left: 4px solid #3BC1A8;
    font-size: 0.95rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.biodata-container p:hover {
    transform: translateX(5px);
    background: rgba(238, 245, 244, 0.9);
    border-left-color: #00F5D4;
}

.biodata-container strong {
    color: #005461;
    display: inline-block;
    width: 180px;
}

/* Logout Button */
.logout-btn {
    float: right;
    background: #ffebee;
    color: #d32f2f;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    background: #d32f2f;
    color: white;
}

/* Responsive Design */
@media (max-width: 600px) {
    body { padding: 20px 15px; }
    .container { padding: 30px 20px; }
    .biodata-container strong { display: block; width: 100%; margin-bottom: 4px; }
}

/* =========================================
   ID CARD LAYOUT & DROPDOWNS
   ========================================= */

/* ID Card Flexbox Container */
.id-card-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 20px;
}

/* Left Column: Photo & Quick Info */
.id-photo-col {
    flex-basis: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(0, 245, 212, 0.3);
}

.id-name {
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: #050B14;
}

.id-title {
    margin: 0;
    font-size: 0.9rem;
    color: #107E57;
    font-weight: 500;
}

/* Right Column: Dropdowns */
.id-info-col {
    flex-grow: 1;
    width: 100%;
}

/* Custom Dropdown (Accordion) Styling */
.custom-dropdown {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #e1e8ed;
    overflow: hidden;
    transition: all 0.3s ease;
}

.custom-dropdown[open] {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: #00F5D4;
}

/* Dropdown Header */
.custom-dropdown summary {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #0D3B8E;
    font-size: 1.1rem;
    list-style: none; /* Hides default arrow */
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    transition: background 0.2s ease;
}

/* Hides default arrow in Safari/Chrome */
.custom-dropdown summary::-webkit-details-marker {
    display: none;
}

.custom-dropdown summary:hover {
    background: #ffffff;
}

/* Dropdown Content Area */
.dropdown-content {
    padding: 5px 20px 20px 20px;
}

.dropdown-content p {
    background: transparent;
    border-left: 3px solid #00F5D4;
    padding: 8px 12px;
    margin: 6px 0;
    border-radius: 0 6px 6px 0;
}

/* Expand biodata container slightly to fit the ID layout */
.biodata-container {
    max-width: 850px; 
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .id-card-layout {
        flex-direction: column;
        align-items: center;
    }
    .id-photo-col {
        width: 100%;
        flex-basis: auto;
        box-sizing: border-box;
    }
}