* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #c6c6e9;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo::before {
    content: "🔐";
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    position: relative;
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    padding: 0.5rem;
    min-width: 200px;
    z-index: 10000;
    max-height: 400px;
    overflow-y: auto;
}

.language-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.95rem;
    color: #333;
}

.language-item:hover {
    background: #f0f0f0;
}

.language-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-links a:hover {
    color: #f0f0f0;
    transform: translateY(-2px);
}

.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Responsive Header */
@media (max-width: 768px) {
    nav {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-links {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .user-menu {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .balance-badge {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .balance-badge::before {
        font-size: 1rem;
    }

    .user-info {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .user-info::before {
        font-size: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .user-dropdown {
        min-width: 180px;
        right: -10px;
    }
}

/* Sign Section */
.sign-section {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 2rem;
}

.upload-area:hover {
    background: #e9ecef !important;
    border-color: #0051D5 !important;
}

.upload-area.dragover {
    background: #e3f2fd !important;
    border-color: #0051D5 !important;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
}

/* App Info Styling */
.app-info {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 24px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-icon-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.app-icon {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s;
    border: 4px solid white;
}

.app-icon:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.icon-edit-btn {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    border: 3px solid white;
}

.icon-edit-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.app-details {
    background: linear-gradient(135deg, #8194b1 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.5);
}

.app-details-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.app-details-title::before {
    content: "📋";
    font-size: 1.3rem;
}

.detail-item {
    margin-bottom: 1rem;
    position: relative;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.detail-label::before {
    font-size: 1rem;
}

.detail-item:has(#editDisplayName) .detail-label::before {
    content: "✏️";
}

.detail-item:has(#editBundleName) .detail-label::before {
    content: "📦";
}

.detail-item:has(#editBundleId) .detail-label::before {
    content: "🆔";
}

.detail-item:has(#editShortVersion) .detail-label::before {
    content: "🏷️";
}

.detail-item:has(#editBundleVersion) .detail-label::before {
    content: "🔢";
}

.detail-item:has(#editMinOSVersion) .detail-label::before {
    content: "📱";
}

.detail-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s;
    background: #fafafa;
    box-sizing: border-box;
}

.detail-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.detail-input[readonly] {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

/* App Metadata Styling */
.app-metadata {
    background: linear-gradient(135deg, #8194b1 0%, #c3cfe2 100%);
    border-radius: 24px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    animation: fadeInUp 0.5s ease-out;
}

.metadata-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255,255,255,0.5);
}

.metadata-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metadata-title::before {
    content: "✨";
    font-size: 1.75rem;
}

.back-btn-metadata {
    background: linear-gradient(135deg, #86868b 0%, #6a6a6a 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(134, 134, 139, 0.3);
}

.back-btn-metadata:hover {
    background: linear-gradient(135deg, #6a6a6a 0%, #555 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(134, 134, 139, 0.4);
}

.metadata-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.metadata-item {
    position: relative;
}

.metadata-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.metadata-item:has(#appCategory) .metadata-label::before {
    content: "📂";
}

.metadata-item:has(#appAge) .metadata-label::before {
    content: "👶";
}

.metadata-item:has(#displayLanguage) .metadata-label::before {
    content: "🌐";
}

.metadata-item:has(#appDescription) .metadata-label::before {
    content: "📝";
}

.metadata-item:has(#screenshots) .metadata-label::before {
    content: "📸";
}

.metadata-select,
.metadata-textarea,
.metadata-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all 0.3s;
    background: white;
    box-sizing: border-box;
    font-family: inherit;
}

.metadata-select:focus,
.metadata-textarea:focus,
.metadata-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.metadata-input[type="file"] {
    cursor: pointer;
    padding: 1rem;
    border: 2px dashed #e0e0e0;
    background: #fafafa;
    transition: all 0.3s;
}

.metadata-input[type="file"]:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.metadata-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.metadata-hint {
    font-size: 0.85rem;
    color: #667eea;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metadata-hint::before {
    content: "💡";
}

.screenshot-preview {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.screenshot-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    background: #f5f5f5;
    aspect-ratio: 1;
    transition: all 0.3s;
}

.screenshot-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.screenshot-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.screenshot-remove:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .app-info,
    .app-metadata {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 16px;
    }

    .app-icon-container {
        margin-bottom: 0.75rem;
    }

    .app-icon {
        width: 100px;
        height: 100px;
        font-size: 50px;
    }

    .app-details {
        padding: 1rem;
        margin-top: 0.75rem;
    }

    .detail-item {
        margin-bottom: 0.75rem;
    }

    .metadata-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .metadata-title {
        font-size: 1.1rem;
    }

    .metadata-content {
        gap: 0.75rem;
    }

    .metadata-item {
        margin-bottom: 0;
    }

    .back-btn-metadata {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .screenshot-preview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }

    .sign-section {
        padding: 0 !important;
        margin: 0 !important;
    }

    .sign-section > div {
        border-radius: 0 !important;
        padding: 1rem !important;
        margin: 0 !important;
    }

    .upload-area {
        padding: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .app-icon-container {
        margin-bottom: 0.75rem !important;
    }

    .app-details {
        padding: 1rem !important;
        margin-top: 0.75rem !important;
    }

    .detail-item {
        margin-bottom: 0.75rem !important;
    }

    .metadata-header {
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.5rem !important;
    }

    .metadata-content {
        gap: 0.75rem !important;
    }
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-download {
    background: #28a745;
    color: white;
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-install {
    background: #007AFF;
    color: white;
}

.btn-install:hover {
    background: #0051D5;
    transform: translateY(-2px);
}

.status.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.status.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.status.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Announcements Section */
.announcements-section {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0 2rem;
}
.announcement-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-left: 4px solid #667eea;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.announcement-card:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
.announcement-card.info { border-left-color: #667eea; }
.announcement-card.warning { border-left-color: #f59e0b; }
.announcement-card.success { border-left-color: #10b981; }
.announcement-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.announcement-card.info .announcement-icon::before { content: "📢"; }
.announcement-card.warning .announcement-icon::before { content: "⚠️"; }
.announcement-card.success .announcement-icon::before { content: "✅"; }
.announcement-body h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #1d1d1f;
}
.announcement-body p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-line;
}

/* Pricing Section */
.pricing {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1d1d1f;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.pricing-card.featured {
    border: 3px solid #007AFF;
    transform: scale(1.05);
}

.pricing-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pricing-card .btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.pricing-card.featured::before {
    content: 'Popular';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    color: #007AFF;
    margin: 1rem 0;
}

.pricing-price span {
    font-size: 1rem;
    color: #666;
}

.pricing-features {
    list-style: none;
    margin: 2rem 0;
}

.pricing-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: '✓';
    color: #34C759;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 0;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 2rem 1.5rem;
    color: white;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.2);
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header h2::before {
    font-size: 2rem;
}

#loginModal .modal-header h2::before {
    content: "🔐";
}

#registerModal .modal-header h2::before {
    content: "✨";
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper::before {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 1;
    pointer-events: none;
}

.form-group input[type="email"] {
    padding-left: 3rem;
}

.form-group:has(input[type="email"]) .input-wrapper::before {
    content: "📧";
}

.form-group:has(input[placeholder*="tài khoản"]) .input-wrapper::before,
.form-group:has(input[placeholder*="Tài khoản"]) .input-wrapper::before {
    content: "👤";
}

.form-group input[type="password"] {
    padding-left: 3rem;
    padding-right: 3rem;
}

/* Icon khóa cho password inputs - ưu tiên cao hơn */
.form-group:has(input[type="password"]) .input-wrapper::before,
.form-group:has(input[id*="Password"]) .input-wrapper::before,
.form-group:has(input[name="password"]) .input-wrapper::before,
.form-group:has(input[name="confirm_password"]) .input-wrapper::before {
    content: "🔒";
}

/* Password toggle icon inside input */
.form-group:has(input[type="password"]) .input-wrapper::after,
.form-group:has(input[id*="Password"]) .input-wrapper::after {
    content: "👁️";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #666;
    z-index: 2;
    cursor: pointer;
    pointer-events: none;
    transition: color 0.3s;
    user-select: none;
}

.form-group:has(input[type="password"]) .input-wrapper[data-password-visible]::after,
.form-group:has(input[id*="Password"][type="text"]) .input-wrapper::after {
    content: "🙈";
}

.form-group:has(input[type="password"]) .input-wrapper:hover::after,
.form-group:has(input[id*="Password"]) .input-wrapper:hover::after {
    color: #667eea;
}

/* Make the right side of input clickable for toggle */
.form-group:has(input[type="password"]) .input-wrapper,
.form-group:has(input[id*="Password"]) .input-wrapper {
    position: relative;
    cursor: pointer;
}

.form-group:has(input[type="password"]) .input-wrapper input,
.form-group:has(input[id*="Password"]) .input-wrapper input {
    cursor: text;
}

.form-group input[type="text"] {
    padding-left: 3rem;
}

/* Icon user cho text inputs - nhưng không override password inputs */
.form-group:has(input[type="text"]):not(:has(input[id*="Password"])):not(:has(input[name="password"])):not(:has(input[name="confirm_password"])) .input-wrapper::before {
    content: "👤";
}

/* Override for account input */
.form-group:has(input[placeholder*="tài khoản"]):not(:has(input[id*="Password"])) .input-wrapper::before,
.form-group:has(input[placeholder*="Tài khoản"]):not(:has(input[id*="Password"])) .input-wrapper::before {
    content: "👤";
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #f8f9fa;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group button {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-group button:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.modal-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.modal-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* User Menu */
.user-menu {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

.balance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.balance-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.balance-badge::before {
    content: "💰";
    font-size: 1.2rem;
}

.user-info {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.user-info::before {
    content: "👤";
    font-size: 1.2rem;
}

.user-info span:last-child {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.user-info.active span:last-child {
    transform: rotate(180deg);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    margin-top: 0.5rem;
    min-width: 220px;
    padding: 0.5rem 0;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
    z-index: 1000;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown.active {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    font-weight: 500;
}

.user-dropdown a::before {
    content: "";
    width: 20px;
    height: 20px;
    display: inline-block;
}

.user-dropdown a:nth-child(1)::before {
    content: "📊";
}

.user-dropdown a:nth-child(2)::before {
    content: "💳";
}

.user-dropdown a:nth-child(3)::before {
    content: "📜";
}

.user-dropdown a:nth-child(4)::before {
    content: "🚪";
}

.user-dropdown a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

footer {
    background: #1d1d1f;
    color: white;
    text-align: center;
    padding: 2rem;
}
footer .footer-links {
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
footer .footer-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color 0.3s;
}
footer .footer-links a:hover {
    color: white;
}

/* Busy state for action buttons */
#actionButtons.action-buttons-busy button {
    opacity: 0.5;
    cursor: not-allowed !important;
}

