/* Frontend Styles */
.hmg-rocket-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #00e5ff;
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.15);
    max-width: 1200px;
    margin: 30px auto;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}
.hmg-rocket-container:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00e5ff, #0099ff, #00e5ff);
    animation: gradientShift 3s ease infinite;
    background-size: 200% 100%;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hmg-rocket-container * { box-sizing: border-box; }

.hmg-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid rgba(0, 229, 255, 0.3);
    position: relative;
}
.hmg-header:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: #00e5ff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}
.hmg-header h2 {
    color: #00e5ff;
    margin: 0 0 10px 0;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.hmg-header p {
    color: #b0b0ff;
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.hmg-discount-banner {
    background: linear-gradient(135deg, rgba(255,215,0,0.15) 0%, rgba(255,165,0,0.15) 100%);
    border: 1px solid rgba(255,215,0,0.3);
    color: #FFD700;
    padding: 15px 25px;
    margin-bottom: 30px;
    text-align: center;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}
.hmg-discount-banner:before {
    content: '🌟';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}
.hmg-discount-banner:after {
    content: '🌟';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.hmg-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.hmg-package-card {
    background: rgba(30,30,46,0.85);
    border: 2px solid #2d2d4d;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}
.hmg-package-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,229,255,0.1), transparent);
    transition: 0.6s;
}
.hmg-package-card:hover:before {
    left: 100%;
}
.hmg-package-card:hover {
    border-color: #00e5ff;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.2);
}
.hmg-package-card.active {
    background: rgba(0,229,255,0.12);
    border-color: #00e5ff;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
    animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 229, 255, 0.3); }
    50% { box-shadow: 0 0 40px rgba(0, 229, 255, 0.5); }
}
.hmg-pkg-title {
    font-weight: 600;
    color: #fff;
    font-size: 16px;
    line-height: 1.4;
    z-index: 1;
    flex: 1;
}
.hmg-pkg-price {
    color: #00e5ff;
    font-weight: 700;
    font-size: 20px;
    z-index: 1;
    margin-left: 15px;
    text-shadow: 0 0 10px rgba(0,229,255,0.3);
}

.hmg-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}
.hmg-input-group {
    position: relative;
}
.hmg-input-group label {
    display: block;
    margin-bottom: 10px;
    color: #b0b0ff;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.5px;
}
.hmg-input-group input,
.hmg-input-group select,
.hmg-input-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 15px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s;
}
.hmg-input-group input:focus,
.hmg-input-group select:focus,
.hmg-input-group textarea:focus {
    outline: none;
    border-color: #00e5ff;
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15);
}
.hmg-input-group input::placeholder,
.hmg-input-group textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

#hmgCartArea {
    animation: slideDown 0.5s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hmg-cart-header {
    background: rgba(0,229,255,0.1);
    border: 1px solid rgba(0,229,255,0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.hmg-cart-header h4 {
    margin: 0;
    color: #00e5ff;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hmg-cart-item {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    border-left: 4px solid #00e5ff;
    animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.hmg-cart-item-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hmg-cart-item-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
}
.hmg-qty-btn {
    background: rgba(0,229,255,0.15);
    border: 1px solid rgba(0,229,255,0.4);
    color: #00e5ff;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 60px;
}
.hmg-qty-btn:hover {
    background: rgba(0,229,255,0.25);
    transform: translateY(-2px);
}
.hmg-qty-input {
    width: 80px !important;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-weight: 600;
}
.hmg-item-price {
    margin-left: auto;
    font-weight: 700;
    color: #00ff9d;
    font-size: 16px;
    min-width: 100px;
    text-align: right;
}
.hmg-remove-btn {
    background: linear-gradient(135deg, #ff3232, #ff0000);
    border: none;
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.hmg-remove-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,50,50,0.3);
}

.hmg-cost-summary {
    background: rgba(30,30,46,0.9);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}
.hmg-cost-summary:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00e5ff, #0099ff);
}
.hmg-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: #ccc;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hmg-summary-row:last-child {
    border-bottom: none;
}
.hmg-total-row {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    font-size: 22px;
    font-weight: 700;
    color: #00ff9d;
    border-top: 2px solid rgba(255,255,255,0.1);
    margin-top: 15px;
}

.hmg-payment-options {
    background: rgba(0,229,255,0.08);
    border: 1px solid rgba(0,229,255,0.2);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
}
.hmg-payment-option {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}
.hmg-payment-option:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(5px);
}
.hmg-payment-option.active {
    background: rgba(0,229,255,0.15);
    border: 1px solid rgba(0,229,255,0.4);
}
.hmg-payment-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #00e5ff;
}
.hmg-payment-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}
.hmg-payment-text {
    flex: 1;
}
.hmg-payment-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}
.hmg-payment-desc {
    font-size: 13px;
    color: #b0b0ff;
    opacity: 0.8;
}

.hmg-checkbox-group {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    margin: 25px 0;
}
.hmg-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00e5ff;
    margin-right: 10px;
    vertical-align: middle;
}
.hmg-checkbox-group label {
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    vertical-align: middle;
}
.hmg-tc-link {
    color: #00e5ff;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}
.hmg-tc-link:hover {
    color: #00ff9d;
}

.hmg-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #00e5ff 0%, #0099ff 100%);
    color: #000;
    border: none;
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 12px;
    margin-top: 30px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}
.hmg-submit-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}
.hmg-submit-btn:hover:before {
    left: 100%;
}
.hmg-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.4);
}
.hmg-submit-btn:active {
    transform: translateY(-1px);
}
.hmg-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.hmg-success-message {
    background: linear-gradient(135deg, rgba(0,255,157,0.1) 0%, rgba(0,255,157,0.05) 100%);
    border: 2px solid #00ff9d;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
    animation: successPulse 2s ease;
}
@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0,255,157,0.2); }
    50% { box-shadow: 0 0 30px rgba(0,255,157,0.4); }
}
.hmg-success-message h3 {
    color: #00ff9d;
    margin: 0 0 15px 0;
    font-size: 24px;
}
.hmg-success-message p {
    color: #ccc;
    margin: 10px 0;
    font-size: 16px;
}
.hmg-success-id {
    background: rgba(0,255,157,0.1);
    border: 1px solid #00ff9d;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
    margin: 15px 0;
    font-family: monospace;
    font-size: 18px;
    color: #00ff9d;
}

/* Modal Styles */
.hmg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.hmg-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00e5ff;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 229, 255, 0.25);
    animation: modalSlide 0.4s ease;
}
@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}
.hmg-modal-header {
    background: rgba(0,0,0,0.3);
    padding: 25px;
    border-bottom: 1px solid rgba(0,229,255,0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}
.hmg-modal-header h3 {
    margin: 0;
    color: #00e5ff;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hmg-modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all 0.3s;
}
.hmg-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}
.hmg-modal-body {
    padding: 30px;
}
.hmg-tc-scroll-box {
    height: 300px;
    overflow-y: auto;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid rgba(255,255,255,0.1);
}
.hmg-tc-scroll-box::-webkit-scrollbar {
    width: 8px;
}
.hmg-tc-scroll-box::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}
.hmg-tc-scroll-box::-webkit-scrollbar-thumb {
    background: #00e5ff;
    border-radius: 4px;
}
.hmg-scroll-notice {
    text-align: center;
    padding: 15px;
    background: rgba(0,229,255,0.1);
    border-radius: 8px;
    margin: 15px 0;
    color: #00e5ff;
    font-style: italic;
    border: 1px dashed rgba(0,229,255,0.3);
}

/* Credit Dashboard */
.hmg-credit-dashboard {
    background: rgba(30,30,46,0.9);
    border: 2px solid #00e5ff;
    border-radius: 15px;
    padding: 30px;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
}
.hmg-credit-dashboard:before {
    content: '🏦';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    opacity: 0.1;
}
.hmg-credit-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}
.hmg-credit-stat {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}
.hmg-credit-stat:hover {
    transform: translateY(-5px);
    border-color: #00e5ff;
    background: rgba(0,229,255,0.05);
}
.hmg-credit-value {
    font-size: 28px;
    font-weight: 700;
    color: #00ff9d;
    margin: 10px 0;
}
.hmg-credit-label {
    font-size: 13px;
    color: #b0b0ff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Enhanced Progress Bar */
.hmg-progress-container {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid rgba(255,255,255,0.1);
}
.hmg-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.hmg-progress-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}
.hmg-progress-percentage {
    color: #00e5ff;
    font-size: 24px;
    font-weight: 700;
}
.hmg-progress-wrapper {
    height: 28px;
    background: rgba(255,255,255,0.1);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    margin: 20px 0;
}
.hmg-progress-fill {
    height: 100%;
    border-radius: 14px;
    position: relative;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hmg-progress-fill:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.2) 0%, 
        rgba(255,255,255,0.4) 50%, 
        rgba(255,255,255,0.2) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.hmg-progress-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.hmg-progress-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}
.hmg-progress-marker:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}
.hmg-progress-label {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #b0b0ff;
    white-space: nowrap;
}
.hmg-progress-threshold {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: rgba(255,255,255,0.3);
    z-index: 1;
}
.hmg-progress-threshold.warning {
    background: #FF9800;
    box-shadow: 0 0 10px rgba(255,152,0,0.5);
}
.hmg-progress-threshold.critical {
    background: #F44336;
    box-shadow: 0 0 10px rgba(244,67,54,0.5);
}
.hmg-progress-threshold-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.hmg-progress-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: #b0b0ff;
}
.hmg-usage-warning {
    background: rgba(255,152,0,0.1);
    border: 1px solid rgba(255,152,0,0.3);
    color: #FF9800;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}
.hmg-usage-warning.show {
    display: block;
    animation: slideIn 0.5s ease;
}
.hmg-usage-critical {
    background: rgba(244,67,54,0.1);
    border: 1px solid rgba(244,67,54,0.3);
    color: #F44336;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
    animation: pulseWarning 2s infinite;
}
@keyframes pulseWarning {
    0%, 100% { box-shadow: 0 0 10px rgba(244,67,54,0.2); }
    50% { box-shadow: 0 0 20px rgba(244,67,54,0.4); }
}
.hmg-usage-critical.show {
    display: block;
    animation: slideIn 0.5s ease, pulseWarning 2s infinite;
}

/* Tabs */
.hmg-tabs {
    display: flex;
    border-bottom: 2px solid rgba(0,229,255,0.3);
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 5px;
}
.hmg-tab-btn {
    background: none;
    border: none;
    color: #b0b0ff;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    transition: all 0.3s;
    border-radius: 8px 8px 0 0;
}
.hmg-tab-btn:hover {
    color: #00e5ff;
    background: rgba(0,229,255,0.1);
}
.hmg-tab-btn.active {
    color: #00e5ff;
    background: rgba(0,229,255,0.1);
}
.hmg-tab-btn.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #00e5ff;
    border-radius: 3px;
}
.hmg-tab-content {
    display: none;
    animation: fadeIn 0.5s;
}
.hmg-tab-content.active {
    display: block;
}

/* Dashboard Table */
.hmg-dashboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(30,30,46,0.8);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.hmg-dashboard-table thead {
    background: rgba(0,229,255,0.2);
}
.hmg-dashboard-table th {
    color: #00e5ff;
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(0,229,255,0.3);
}
.hmg-dashboard-table tbody tr {
    transition: all 0.3s;
}
.hmg-dashboard-table tbody tr:hover {
    background: rgba(255,255,255,0.05);
}
.hmg-dashboard-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #ccc;
    font-size: 14px;
}
.hmg-dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .hmg-rocket-container {
        padding: 20px;
        margin: 15px;
    }
    .hmg-packages-grid {
        grid-template-columns: 1fr;
    }
    .hmg-form-grid {
        grid-template-columns: 1fr;
    }
    .hmg-credit-stats {
        grid-template-columns: 1fr;
    }
    .hmg-tabs {
        flex-direction: column;
    }
    .hmg-tab-btn {
        width: 100%;
        text-align: left;
        border-radius: 8px;
        margin-bottom: 5px;
    }
    .hmg-tab-btn.active:after {
        display: none;
    }
    .hmg-cart-item-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .hmg-item-price {
        margin-left: 0;
        text-align: left;
    }
}