/* Reset & Base */
* {
    box_sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #fafafa;
    background-image: url('https://lamdong.gov.vn/sites/book/diachidalat/Phan2/Images/DALAT.jpg');
    background-repeat: no-repeat;
    background-size: cover; /* Cover the whole screen */
    background-attachment: fixed; /* Parallax feel */
    background-position: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #262626;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* Layout */
.app-container {
    width: 100%;
    max-width: 470px; /* Slightly wider for better breathing room */
    background: rgba(255, 255, 255, 0.25); /* Ultra transparency for deep liquid look */
    backdrop-filter: blur(50px) saturate(200%); /* Maximum vibrancy and blur */
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    background-image: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 100%); /* Subtle sheen overlay */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15); /* Deep soft shadow */
    border-left: 1px solid rgba(255, 255, 255, 0.6); /* Sharper glass edge */
    border-right: 1px solid rgba(255, 255, 255, 0.6);
}

@media (max-width: 480px) {
    .app-container {
        box-shadow: none;
    }
}

/* Header */
.ig-header {
    height: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    z-index: 100;
}

.ig-logo {
    font-family: 'Grand Hotel', cursive; /* Using the font imported in HTML */
    font-size: 32px;
    color: #262626;
    text-decoration: none;
    letter-spacing: 1px;
    transition: transform 0.2s;
}

.ig-logo:active {
    transform: scale(0.95);
}

/* Login Page Specific */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
    /* background-color: #fafafa; Removed to show body background */
}

.login-box {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 350px;
    text-align: center;
    margin-bottom: 10px;
    border-radius: 16px;
}

.login-logo {
    font-family: 'Grand Hotel', cursive;
    font-size: 48px;
    margin-bottom: 30px;
    color: #262626;
}

/* Forms */
.ig-input {
    width: 100%;
    background: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 6px; /* Rounded corners */
    padding: 10px 12px;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.ig-input:focus {
    border-color: #a8a8a8;
}

.ig-btn {
    background-color: #0095f6;
    color: white;
    border: none;
    border-radius: 8px; /* Softer buttons */
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.ig-btn:hover {
    background-color: #1877f2;
}

.ig-btn:disabled, .ig-btn.secondary {
    background-color: #b2dffc;
    cursor: default;
}

.ig-btn.secondary {
    background-color: transparent;
    color: #0095f6;
    border: none;
}
.ig-btn.secondary:hover {
    color: #00376b;
    background: none;
}

/* Feed / Content */
.feed-content {
    padding-bottom: 60px;
}

/* Profile Section */
.profile-header {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    text-align: center;
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); /* IG Gradient Border */
    padding: 2px; /* Border width */
    margin: 0 auto 15px auto; /* Center it */
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-pic-inner {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    color: #555;
    text-transform: uppercase;
}

.profile-info h2 {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 5px;
    color: #262626;
}

.profile-stats {
    display: flex;
    gap: 40px;
    font-size: 15px;
    justify-content: center;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
}
.stat-value { font-weight: 700; color: #262626; }
.stat-label { color: #262626; font-size: 14px;}

/* Posts (Cards) */
.post-card {
    background: rgba(255, 255, 255, 0.5); /* Semi-transparent white */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.6); /* Frosty border */
    border-radius: 20px;
    margin: 20px 15px; /* Floating bubble look */
    padding-bottom: 20px;
    overflow: hidden; /* Ensure media truncates at corners */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.post-header {
    padding: 14px;
    display: flex;
    align-items: center;
}

/* Updated User Label since Avatar is gone */
.post-user {
    font-weight: 600;
    font-size: 14px;
    color: #262626;
    cursor: pointer;
}
.post-user:hover {
    text-decoration: underline;
}

.post-image-container {
    background-color: #fafafa;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}
.post-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Actions Removed, but if added back: */
.post-actions {
    padding: 12px 14px;
    display: flex;
    gap: 16px;
}

.action-btn {
    font-size: 26px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: transform 0.1s;
}
.action-btn:active {
    transform: scale(1.2);
}

.post-likes {
    padding: 0 14px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #262626;
}

.post-caption {
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
}

.post-caption strong {
    font-weight: 600;
    margin-right: 5px;
    color: #262626;
}

.timestamp {
    color: #8e8e8e;
    font-size: 11px;
    text-transform: uppercase;
    margin-top: 8px;
    display: block;
    letter-spacing: 0.5px;
}

/* Custom Progress Bar */
.ig-progress-container {
    height: 6px; /* Slightly thicker */
    background: #efefef;
    border-radius: 3px;
    overflow: hidden;
    margin: 15px 0;
}
.ig-progress {
    height: 100%;
    background: linear-gradient(90deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); /* IG Gradient */
    border-radius: 3px;
    transition: width 1s ease-in-out;
}
.ig-progress.green { background: #0095f6; } 

/* Form Groups in Pages */
.form-section {
    padding: 20px;
}
.form-label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: #262626;
}

/* List Items (Options) */
.list-option {
    padding: 16px;
    border-bottom: 1px solid #efefef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s;
}
.list-option:hover {
    background-color: #fafafa;
}
.list-option input[type="radio"] {
    accent-color: #0095f6;
    width: 20px;
    height: 20px;
}
.option-details div:first-child {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}
.option-details div:last-child {
    color: #8e8e8e;
    font-size: 13px;
}

/* Helpers */
.text-center { text-align: center; }
.text-link { color: #0095f6; text-decoration: none; font-weight: 600; font-size: 14px; }
.error-msg { 
    color: #ed4956; 
    font-size: 14px; 
    text-align: center; 
    margin-bottom: 20px; 
    background: rgba(237, 73, 86, 0.1);
    padding: 10px;
    border-radius: 4px;
}

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

.post-card {
    animation: fadeIn 0.5s ease-out;
}

/* Mini Pulse Button for Fund Widget */
.mini-pulse-btn {
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 149, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(0, 149, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 149, 246, 0);
    }
}

/* Invoice Modal & Button */
.invoice-btn {
    background: none;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #262626;
    transition: all 0.2s;
    font-weight: 500;
}
.invoice-btn:hover {
    background: #fafafa;
    border-color: #8e8e8e;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-receipt {
    background: white;
    width: 90%;
    max-width: 340px;
    padding: 30px 25px;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    /* Paper texture effect */
    background-image: radial-gradient(#f0f0f0 1px, transparent 1px);
    background-size: 20px 20px;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #8e8e8e;
    line-height: 1;
}

.receipt-header {
    text-align: center;
    margin-bottom: 25px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #4bb543;
    border-radius: 50%;
    color: white;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 4px 10px rgba(75, 181, 67, 0.3);
}

.receipt-body {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #262626;
    background: #fff;
    padding: 15px;
    border: 1px dashed #dbdbdb;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.receipt-row.total {
    font-weight: bold;
    font-size: 16px;
    margin-top: 15px;
    border-top: 1px solid #efefef;
    padding-top: 15px;
}

.receipt-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
    color: #8e8e8e;
}

