

.x8gd-game-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.x8gd-game-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.x8gd-banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.x8gd-game-banner-wrapper.x8gd-position-summary .x8gd-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
}

.x8gd-game-banner-wrapper.x8gd-position-summary .x8gd-connection-status,
.x8gd-game-banner-wrapper.x8gd-position-summary .x8gd-connection-notice {
    margin: 15px auto;
}

.x8gd-banner-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.x8gd-banner-text h3 {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 1.4em;
    font-weight: 600;
}

.x8gd-banner-text p {
    margin: 0;
    color: #f0f0f0;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Fire Phoenix specific styling */
.x8gd-game-banner-fire-phoenix {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e00 50%, #ff4757 100%);
}

.x8gd-game-banner-fire-phoenix .x8gd-banner-icon {
    filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.6));
}

.x8gd-credit-info {
    margin-top: 10px;
    font-size: 0.9em;
    color: #fff3cd;
}

/* Connection Status Styling */
.x8gd-connection-status {
    margin: 15px 0;
    padding: 18px 22px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.x8gd-connection-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #4caf50, #66bb6a);
}

.x8gd-connection-status.x8gd-connected {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.x8gd-connection-status p {
    margin: 0 !important;
    font-size: 0.95em;
    font-weight: 500;
    color: #2e7d32 !important;
}

.x8gd-status-icon {
    font-size: 1.3em;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(76, 175, 80, 0.3));
}

/* Simplified connected banner styling */
.x8gd-connection-status.x8gd-connected-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12), rgba(102, 187, 106, 0.08));
    border: 1px solid rgba(76, 175, 80, 0.25);
    border-radius: 12px;
    margin: 15px 0;
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.15);
    transition: all 0.3s ease;
}

.x8gd-connection-status.x8gd-connected-simple:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(102, 187, 106, 0.12));
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.2);
    transform: translateY(-1px);
}

.x8gd-connection-status.x8gd-connected-simple::before {
    width: 3px;
}

.x8gd-connected-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.x8gd-connected-text {
    color: #2e7d32 !important;
    font-weight: 600;
    font-size: 0.95em;
    margin: 0;
}

.x8gd-view-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.x8gd-view-details-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: left 0.5s;
}

.x8gd-view-details-btn:hover::before {
    left: 100%;
}

.x8gd-view-details-btn:hover {
    background: linear-gradient(135deg, #45a049, #5cb85c);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.4);
    color: white !important;
}

.x8gd-view-details-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

/* Connection Notice Styling */
.x8gd-connection-notice {
    margin: 10px 0;
    padding: 15px;
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 8px;
}

.x8gd-connection-notice p {
    margin: 0 0 10px 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.x8gd-notice-icon {
    font-size: 1.1em;
    flex-shrink: 0;
}

.x8gd-connect-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b35 !important;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.x8gd-connect-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Game Connection Form Styling */
.x8gd-game-connect-form {
    margin: 30px auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        0 1px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 107, 53, 0.2);
    position: relative;
    overflow: hidden;
    color: #2c3e50 !important;
}

.x8gd-game-connect-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #f7931e, #ff4757);
    border-radius: 20px 20px 0 0;
}

.x8gd-game-connect-form h3 {
    margin: 0 0 25px 0;
    color: #2c3e50 !important;
    font-size: 1.5em;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.x8gd-game-connect-form h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    border-radius: 2px;
    animation: x8gd-underline-glow 2s ease-in-out infinite alternate;
}

@keyframes x8gd-underline-glow {
    0% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 107, 53, 0.8), 0 0 25px rgba(247, 147, 30, 0.4);
    }
}

/* Loading state for forms */
.x8gd-form-loading .x8gd-form-group input {
    pointer-events: none;
    opacity: 0.7;
}

.x8gd-form-loading .x8gd-btn:not([type="submit"]) {
    pointer-events: none;
    opacity: 0.5;
}

/* Smooth form transitions */
.x8gd-game-form {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.x8gd-game-form[style*="display: none"] {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.x8gd-game-form {
    margin-top: 25px;
}

.x8gd-form-group {
    margin-bottom: 25px;
    position: relative;
}

.x8gd-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e !important;
    font-size: 0.95em;
    position: relative;
    padding-left: 20px;
}

.x8gd-form-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 50%;
}

.x8gd-form-group input[type="text"],
.x8gd-form-group input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e8ecf4;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: #ffffff;
    font-family: inherit;
}

.x8gd-form-group input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 
        0 0 0 4px rgba(255, 107, 53, 0.1),
        0 4px 12px rgba(255, 107, 53, 0.15);
    transform: translateY(-1px);
}

.x8gd-form-group input:hover:not(:focus) {
    border-color: #d1d9e6;
}

.x8gd-form-note {
    display: block;
    margin-top: 8px;
    font-size: 0.8em;
    color: #7f8c8d !important;
    font-style: italic;
    padding-left: 20px;
    position: relative;
}

.x8gd-form-note::before {
    content: 'ℹ️';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.9em;
}

.x8gd-form-actions {
    display: flex;
    gap: 16px;
    margin-top: 35px;
    flex-wrap: wrap;
    justify-content: center;
}

.x8gd-btn {
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 160px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.x8gd-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: left 0.5s;
}

.x8gd-btn:hover::before {
    left: 100%;
}

.x8gd-btn-primary {
    background: linear-gradient(135deg, #ff6b35, #f7931e, #ff4757);
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.x8gd-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #e55a2b, #e8841a, #ff3742);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.x8gd-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.x8gd-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.x8gd-btn-secondary {
    background: #ffffff;
    color: #6c757d !important;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.x8gd-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #5a6268 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.x8gd-form-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 0.9em;
    display: none;
    position: relative;
    font-weight: 500;
}

.x8gd-form-message.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
    box-shadow: 0 4px 15px rgba(21, 87, 36, 0.1);
}

.x8gd-form-message.success::before {
    content: '✅';
    margin-right: 10px;
    font-size: 1.1em;
}

.x8gd-form-message.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
    box-shadow: 0 4px 15px rgba(114, 28, 36, 0.1);
}

.x8gd-form-message.error::before {
    content: '❌';
    margin-right: 10px;
    font-size: 1.1em;
}

/* Validation States */
.x8gd-validating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6c757d !important;
    font-style: italic;
    animation: x8gd-pulse 1.5s ease-in-out infinite;
}

.x8gd-validating::before {
    content: '🔄';
    animation: x8gd-spin 2s linear infinite;
}

@keyframes x8gd-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes x8gd-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Player Information Display */
.x8gd-success-message {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(21, 87, 36, 0.2);
}

.x8gd-player-info {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(21, 87, 36, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

.x8gd-player-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #66bb6a, #81c784);
    border-radius: 15px 15px 0 0;
}

.x8gd-player-info.x8gd-refreshing {
    opacity: 0.6;
    pointer-events: none;
}

.x8gd-player-info h4 {
    margin: 0 0 20px 0;
    color: #2e7d32 !important;
    font-size: 1.2em;
    font-weight: 700;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(76, 175, 80, 0.2);
    position: relative;
}

.x8gd-player-info h4::before {
    content: '👤';
    margin-right: 10px;
    font-size: 1.1em;
    filter: drop-shadow(0 2px 4px rgba(46, 125, 50, 0.3));
}

.x8gd-player-details {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.x8gd-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 10px;
    border-left: 4px solid #4caf50;
    transition: all 0.3s ease;
}

.x8gd-detail-item:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateX(3px);
}

.x8gd-detail-item strong {
    font-weight: 600;
    color: #2e7d32 !important;
    font-size: 0.9em;
}

.x8gd-detail-item span {
    font-weight: 500;
    color: #1b5e20 !important;
    font-size: 0.9em;
    text-align: right;
}

/* Enhanced styling for highlighted/primary fields */
.x8gd-detail-item.x8gd-highlight {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(102, 187, 106, 0.08));
    border-left: 4px solid #66bb6a;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
    position: relative;
    overflow: hidden;
}

.x8gd-detail-item.x8gd-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #4caf50, #66bb6a);
}

.x8gd-detail-item.x8gd-highlight:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(102, 187, 106, 0.12));
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

/* Money/Financial field styling */
.x8gd-detail-item.x8gd-money {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 206, 84, 0.08));
    border-left-color: #ffc107;
}

.x8gd-detail-item.x8gd-money::before {
    background: linear-gradient(180deg, #ffc107, #ffcd39);
}

.x8gd-detail-item.x8gd-money:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 206, 84, 0.12));
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

/* Winning field styling */
.x8gd-detail-item.x8gd-winning {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12), rgba(129, 199, 132, 0.1));
    border-left-color: #4caf50;
}

.x8gd-detail-item.x8gd-winning::before {
    background: linear-gradient(180deg, #4caf50, #66bb6a);
}

.x8gd-detail-item.x8gd-winning:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.18), rgba(129, 199, 132, 0.15));
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}

/* Value styling */
.x8gd-value-primary {
    font-weight: 600 !important;
    color: #2e7d32 !important;
    font-size: 1em !important;
}

.x8gd-value-money {
    font-weight: 700 !important;
    color: #ff8f00 !important;
    font-size: 1.1em !important;
    text-shadow: 0 1px 2px rgba(255, 143, 0, 0.3);
}

.x8gd-value-winning {
    font-weight: 700 !important;
    color: #2e7d32 !important;
    font-size: 1.1em !important;
    text-shadow: 0 1px 2px rgba(46, 125, 50, 0.3);
}

/* No data message styling */
.x8gd-detail-item.x8gd-no-data {
    background: linear-gradient(135deg, rgba(158, 158, 158, 0.1), rgba(189, 189, 189, 0.08));
    border-left: 4px solid #9e9e9e;
    text-align: center;
    justify-content: center;
}

.x8gd-no-data-message {
    font-style: italic;
    color: #757575 !important;
    font-size: 0.9em;
    text-align: center;
}

.x8gd-player-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(76, 175, 80, 0.2);
}

.x8gd-btn-info {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: white !important;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    min-width: 140px;
    font-size: 0.9em;
    padding: 12px 24px;
}

.x8gd-btn-info:hover:not(:disabled) {
    background: linear-gradient(135deg, #138496, #1e9b7f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.x8gd-btn-info:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Player info in form message context */
.x8gd-form-message .x8gd-player-info {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(21, 87, 36, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(21, 87, 36, 0.05);
}

.x8gd-form-message .x8gd-player-info h4 {
    margin: 0 0 15px 0;
    color: #155724 !important;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(21, 87, 36, 0.2);
    position: relative;
}

.x8gd-form-message .x8gd-player-info h4::before {
    content: '👤';
    margin-right: 8px;
}

.x8gd-form-message .x8gd-player-info p {
    margin: 8px 0;
    color: #155724 !important;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dotted rgba(21, 87, 36, 0.2);
}

.x8gd-form-message .x8gd-player-info p:last-child {
    border-bottom: none;
}

.x8gd-form-message .x8gd-player-info strong {
    font-weight: 600;
    color: #0c3d1a !important;
}

/* Enhanced Error Messages */
.x8gd-form-message.error small {
    display: block;
    margin-top: 8px;
    font-size: 0.8em;
    opacity: 0.8;
    font-style: italic;
}

/* API Error Specific Styling */
.x8gd-form-message.error[data-error-type="api"] {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-color: #ffeaa7;
}

.x8gd-form-message.error[data-error-type="api"]::before {
    content: '⚠️';
}

/* Credentials Error Specific Styling */
.x8gd-form-message.error[data-error-type="credentials"] {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: #f5c6cb;
}

.x8gd-form-message.error[data-error-type="credentials"]::before {
    content: '🔑';
}

/* Loading State for Form */
.x8gd-form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.x8gd-form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    border-radius: 12px;
}

/* Enhanced Connection Status with Animation */
.x8gd-connection-status.x8gd-connected {
    animation: x8gd-connection-success 0.6s ease-out;
}

@keyframes x8gd-connection-success {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Success Message Animation */
.x8gd-form-message.success {
    animation: x8gd-slide-in-up 0.5s ease-out;
}

@keyframes x8gd-slide-in-up {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Error Message Animation */
.x8gd-form-message.error {
    animation: x8gd-shake 0.6s ease-out;
}

@keyframes x8gd-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

/* Real-time Validation States */
.x8gd-form-group input.x8gd-validating {
    border-color: #ffc107;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.1);
}

.x8gd-form-group input.x8gd-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.x8gd-form-group input.x8gd-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

/* Progressive Enhancement for Modern Browsers */
@supports (backdrop-filter: blur(10px)) {
    .x8gd-player-info {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(5px);
    }
}

.x8gd-connect-notice {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    color: #6c757d !important;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Account Selection Styling */
.x8gd-account-selection {
    margin-bottom: 25px;
}

.x8gd-account-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.x8gd-option-card {
    background: #ffffff;
    border: 2px solid #e8ecf4;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.x8gd-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e8ecf4, #d1d9e6);
    transition: all 0.3s ease;
}

.x8gd-option-card:hover:not(.x8gd-option-disabled) {
    border-color: #ff6b35;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
}

.x8gd-option-card:hover:not(.x8gd-option-disabled)::before {
    background: linear-gradient(90deg, #ff6b35, #f7931e);
}

.x8gd-option-new {
    border-color: #28a745;
}

.x8gd-option-new::before {
    background: linear-gradient(90deg, #28a745, #34ce57);
}

.x8gd-option-new:hover {
    border-color: #28a745 !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15);
}

.x8gd-option-existing {
    border-color: #17a2b8;
}

.x8gd-option-existing::before {
    background: linear-gradient(90deg, #17a2b8, #20c997);
}

.x8gd-option-existing:hover {
    border-color: #17a2b8 !important;
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.15);
}

.x8gd-option-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #dee2e6;
}

.x8gd-option-disabled::before {
    background: linear-gradient(90deg, #6c757d, #adb5bd);
}

.x8gd-option-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.x8gd-option-new .x8gd-option-icon {
    filter: drop-shadow(0 2px 4px rgba(40, 167, 69, 0.3));
}

.x8gd-option-existing .x8gd-option-icon {
    filter: drop-shadow(0 2px 4px rgba(23, 162, 184, 0.3));
}

.x8gd-option-content h4 {
    margin: 0 0 12px 0;
    color: #2c3e50 !important;
    font-size: 1.2em;
    font-weight: 700;
}

.x8gd-option-content p {
    margin: 0 0 20px 0;
    color: #6c757d !important;
    font-size: 0.9em;
    line-height: 1.5;
}

.x8gd-option-card .x8gd-btn {
    margin: 0;
    width: 100%;
    min-width: auto;
}

/* New Account Creation Button */
#x8gd-create-account-btn {
    background: linear-gradient(135deg, #28a745, #34ce57);
    color: white !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

#x8gd-create-account-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838, #2bb34a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Connect Existing Button */
#x8gd-connect-existing-btn {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: white !important;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

#x8gd-connect-existing-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #138496, #1e9b7f);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

/* Account Created Badge */
.x8gd-account-created-notice {
    margin: 8px 0 !important;
    padding: 8px 15px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(52, 206, 87, 0.08));
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-radius: 8px;
    text-align: center;
}

.x8gd-created-badge {
    color: #155724 !important;
    font-weight: 600;
    font-size: 0.85em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* New Account Credentials Display */
.x8gd-new-account-info {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(52, 206, 87, 0.08));
    border: 2px solid rgba(40, 167, 69, 0.2);
    border-radius: 12px;
    position: relative;
}

.x8gd-new-account-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #34ce57);
    border-radius: 12px 12px 0 0;
}

.x8gd-new-account-info h4 {
    margin: 0 0 15px 0;
    color: #155724 !important;
    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(21, 87, 36, 0.2);
}

.x8gd-new-account-info h4::before {
    content: '🆕';
    margin-right: 8px;
}

.x8gd-credentials {
    display: grid;
    gap: 12px;
    margin-bottom: 15px;
}

.x8gd-credentials p {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(21, 87, 36, 0.1);
}

.x8gd-credentials strong {
    color: #0c3d1a !important;
    font-weight: 600;
}

.x8gd-credentials code {
    background: rgba(21, 87, 36, 0.1);
    color: #155724 !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.9em;
    border: 1px solid rgba(21, 87, 36, 0.2);
    user-select: all;
    cursor: pointer;
}

.x8gd-credentials code:hover {
    background: rgba(21, 87, 36, 0.15);
}

.x8gd-save-credentials {
    margin: 0;
    padding: 12px;
    background: rgba(255, 193, 7, 0.1);
    color: #856404 !important;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    text-align: center;
}

/* Email Status Styling */
.x8gd-email-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px 0 0 0;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9em;
    text-align: center;
}

.x8gd-email-status.x8gd-email-sent {
    background: rgba(40, 167, 69, 0.1);
    color: #155724 !important;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.x8gd-email-status.x8gd-email-failed {
    background: rgba(255, 193, 7, 0.1);
    color: #856404 !important;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.x8gd-email-icon {
    font-size: 1.1em;
    flex-shrink: 0;
}

/* Account Actions Container */
.x8gd-account-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.x8gd-account-actions .x8gd-btn {
    flex: 1;
    min-width: 140px;
    max-width: 200px;
}

/* Buy Credits/Game Button */
.x8gd-btn-game {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.x8gd-btn-game:hover:not(:disabled) {
    background: linear-gradient(135deg, #e55a2b, #e8841a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.x8gd-btn-game:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.x8gd-btn-game:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Game button loading animation */
.x8gd-btn-game:disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: x8gd-button-shine 1.5s infinite;
}

@keyframes x8gd-button-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Ensure all text elements in the form have proper colors */
.x8gd-game-connect-form,
.x8gd-game-connect-form * {
    color: #2c3e50 !important;
}

.x8gd-game-connect-form p,
.x8gd-game-connect-form div,
.x8gd-game-connect-form span {
    color: #2c3e50 !important;
}

.x8gd-game-connect-form .x8gd-connection-status p {
    color: #2e7d32 !important;
}

.x8gd-game-connect-form .x8gd-connect-notice {
    color: #6c757d !important;
}

/* Force solid background to prevent transparency issues */
.x8gd-game-connect-form {
    background-color: #ffffff !important;
    backdrop-filter: none !important;
}

/* Position-specific styling */
.x8gd-position-before .x8gd-game-banner {
    margin-bottom: 30px;
}

.x8gd-position-after .x8gd-game-banner {
    margin-top: 30px;
}

/* Center banner content */
.x8gd-game-banner-wrapper.x8gd-position-summary {
    margin: 0 auto;
    padding: 0 20px;
}

.x8gd-game-banner-wrapper.x8gd-position-summary .x8gd-game-banner {
    text-align: center;
}



/* Responsive design */
@media (max-width: 768px) {
    .x8gd-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .x8gd-banner-icon {
        font-size: 2em;
    }
    
    .x8gd-banner-text h3 {
        font-size: 1.2em;
    }
    
    .x8gd-position-before .x8gd-game-banner,
    .x8gd-position-after .x8gd-game-banner {
        margin: 20px 0;
    }
    
    /* Centered banner responsive adjustments */
    .x8gd-game-banner-wrapper.x8gd-position-summary {
        padding: 0 10px;
    }
    
    .x8gd-game-connect-form {
        margin: 15px;
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .x8gd-game-connect-form h3 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }
    
    .x8gd-form-group {
        margin-bottom: 20px;
    }
    
    .x8gd-form-group input[type="text"],
    .x8gd-form-group input[type="password"] {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .x8gd-form-actions {
        flex-direction: column;
        margin-top: 25px;
        gap: 12px;
    }
    
    .x8gd-btn {
        width: 100%;
        min-width: auto;
        padding: 14px 24px;
        font-size: 0.95em;
    }
    
    .x8gd-connection-status {
        padding: 15px 18px;
        gap: 12px;
    }
    
    .x8gd-form-message {
        padding: 14px 18px;
        font-size: 0.85em;
    }
    
    .x8gd-connection-status,
    .x8gd-connection-notice {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .x8gd-connection-status p,
    .x8gd-connection-notice p {
        flex-direction: row;
        justify-content: center;
    }
    
    /* Mobile styling for simplified connected banner */
    .x8gd-connection-status.x8gd-connected-simple {
        flex-direction: column;
        gap: 15px;
        padding: 18px 16px;
        text-align: center;
    }
    
    .x8gd-connected-info {
        justify-content: center;
        gap: 10px;
    }
    
    .x8gd-view-details-btn {
        width: 100%;
        min-width: auto;
        padding: 12px 20px;
        font-size: 0.95em;
    }
    
    /* Mobile account selection styling */
    .x8gd-account-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .x8gd-option-card {
        padding: 20px;
    }
    
    .x8gd-option-icon {
        font-size: 2.5em;
        margin-bottom: 12px;
    }
    
    .x8gd-option-content h4 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .x8gd-option-content p {
        font-size: 0.85em;
        margin-bottom: 15px;
    }
    
    .x8gd-new-account-info {
        padding: 16px;
    }
    
    .x8gd-credentials p {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 10px;
    }
    
    .x8gd-credentials code {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
    }
    
    .x8gd-account-created-notice {
        padding: 6px 12px;
    }
    
    .x8gd-created-badge {
        font-size: 0.8em;
    }
    
    .x8gd-email-status {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    /* Mobile account actions */
    .x8gd-account-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .x8gd-account-actions .x8gd-btn {
        width: 100%;
        max-width: none;
        min-width: auto;
    }
}

/* Modal Styles for Update Password */
.x8gd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    /* Ensure perfect centering */
    margin: 0;
    overflow: auto;
    /* Fallback for older browsers */
    text-align: center;
}

/* Fallback centering for older browsers */
.x8gd-modal:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -0.25em;
}

.x8gd-modal-content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 8px 25px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: x8gd-modal-slide-in 0.3s ease-out;
    /* Ensure perfect centering */
    margin: auto;
    transform: translateZ(0); /* Force hardware acceleration */
    /* Fallback for older browsers */
    display: inline-block;
    vertical-align: middle;
    text-align: left;
}

@keyframes x8gd-modal-slide-in {
    0% {
        transform: scale(0.9) translateY(-20px) translateZ(0);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0) translateZ(0);
        opacity: 1;
    }
}

.x8gd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px 30px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.x8gd-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #f7931e, #ff4757);
    border-radius: 20px 20px 0 0;
}

.x8gd-modal-header h3 {
    margin: 0;
    color: #2c3e50 !important;
    font-size: 1.4em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.x8gd-modal-close {
    font-size: 2em;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.x8gd-modal-close:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

.x8gd-modal-body {
    padding: 30px;
}

.x8gd-modal-body .x8gd-form-group {
    margin-bottom: 25px;
}

.x8gd-modal-body .x8gd-form-group label {
    color: #2c3e50 !important;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    font-size: 0.95em;
}

.x8gd-modal-body .x8gd-form-group input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e8ecf4;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background: #ffffff;
    font-family: inherit;
}

.x8gd-modal-body .x8gd-form-group input[type="password"]:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 
        0 0 0 4px rgba(255, 107, 53, 0.1),
        0 4px 12px rgba(255, 107, 53, 0.15);
    transform: translateY(-1px);
}

.x8gd-modal-body .x8gd-form-group input[type="password"]:hover:not(:focus) {
    border-color: #d1d9e6;
}

.x8gd-modal-footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px 30px 30px;
    justify-content: flex-end;
    border-top: 1px solid #f0f0f0;
}

.x8gd-modal-footer .x8gd-btn {
    min-width: 120px;
    padding: 14px 24px;
    font-size: 0.95em;
}

.x8gd-modal-footer .x8gd-btn-secondary {
    background: #ffffff;
    color: #6c757d !important;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.x8gd-modal-footer .x8gd-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #5a6268 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.x8gd-modal-footer .x8gd-btn-primary {
    background: linear-gradient(135deg, #ff6b35, #f7931e, #ff4757);
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.x8gd-modal-footer .x8gd-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #e55a2b, #e8841a, #ff3742);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.x8gd-modal-footer .x8gd-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.x8gd-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 0.9em;
    display: none;
    position: relative;
    font-weight: 500;
}

.x8gd-message.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
    box-shadow: 0 4px 15px rgba(21, 87, 36, 0.1);
}

.x8gd-message.success::before {
    content: '✅';
    margin-right: 10px;
    font-size: 1.1em;
}

.x8gd-message.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
    box-shadow: 0 4px 15px rgba(114, 28, 36, 0.1);
}

.x8gd-message.error::before {
    content: '❌';
    margin-right: 10px;
    font-size: 1.1em;
}

/* Warning button style for Update Password button */
.x8gd-btn-warning {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #212529 !important;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.x8gd-btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.x8gd-btn-warning:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.x8gd-btn-warning:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
}

/* Mobile responsive for modal */
@media (max-width: 768px) {
    .x8gd-modal {
        padding: 10px;
    }
    
    .x8gd-modal-content {
        max-width: none;
        width: 100%;
        border-radius: 15px;
    }
    
    .x8gd-modal-header {
        padding: 20px 20px 15px 20px;
    }
    
    .x8gd-modal-header h3 {
        font-size: 1.2em;
    }
    
    .x8gd-modal-close {
        font-size: 1.5em;
        width: 35px;
        height: 35px;
    }
    
    .x8gd-modal-body {
        padding: 20px;
    }
    
    .x8gd-modal-body .x8gd-form-group {
        margin-bottom: 20px;
    }
    
    .x8gd-modal-body .x8gd-form-group input[type="password"] {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .x8gd-modal-footer {
        flex-direction: column;
        padding: 15px 20px 20px 20px;
        gap: 12px;
    }
    
    .x8gd-modal-footer .x8gd-btn {
        width: 100%;
        min-width: auto;
        padding: 14px 20px;
    }
} 