/* Auth Pages Styles */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: linear-gradient(145deg, 
        rgba(20, 15, 10, 0.95),
        rgba(35, 25, 15, 0.9));
    border: 1px solid rgba(180, 140, 80, 0.25);
    border-radius: 6px;
    padding: 2.5rem 3rem;
    max-width: 360px;
    width: 100%;
    box-shadow: 
        0 0 40px rgba(0, 0, 0, 0.5),
        inset 0 0 60px rgba(180, 140, 80, 0.03);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .emblem {
    font-size: 2.5rem;
    color: #c9a227;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 20px rgba(201, 162, 39, 0.4);
}

.auth-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #e8d5a3;
    margin-bottom: 0;
    letter-spacing: 2px;
    font-weight: 400;
}

/* Auth Methods */
.auth-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Twitter Button */
.twitter-btn {
    background: #000;
    color: #fff;
    border: 1px solid #333;
}

.twitter-btn:hover:not(:disabled) {
    background: #1a1a1a;
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Discord Button */
.discord-btn {
    background: #5865F2;
    color: #fff;
    border: 1px solid #4752c4;
}

.discord-btn:hover:not(:disabled) {
    background: #4752c4;
    border-color: #3c45a5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.btn-icon-svg {
    width: 20px;
    height: 15px;
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: rgba(200, 180, 140, 0.4);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(180, 140, 80, 0.3), 
        transparent);
}

/* Footer */
.auth-footer {
    margin-top: 1.75rem;
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(180, 140, 80, 0.1);
}

.back-link {
    color: rgba(200, 180, 140, 0.5);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
}

.back-link:hover {
    color: #c9a227;
}

/* Error Message */
.auth-error {
    background: rgba(180, 50, 50, 0.2);
    border: 1px solid rgba(180, 50, 50, 0.4);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #e8a3a3;
    text-align: center;
    font-size: 0.9rem;
}

/* Success Message */
.auth-success {
    background: rgba(50, 180, 80, 0.2);
    border: 1px solid rgba(50, 180, 80, 0.4);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #a3e8b5;
    text-align: center;
    font-size: 0.9rem;
}

/* ============================================ */
/* User Profile / Account Settings Styles */
/* ============================================ */

.user-menu {
    position: relative;
}

.user-avatar-btn {
    background: none;
    border: 1px solid rgba(180, 140, 80, 0.3);
    border-radius: 50%;
    padding: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-btn:hover {
    border-color: #c9a227;
}

.user-avatar-btn img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-btn .avatar-placeholder {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(180, 140, 80, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c9a227;
    font-size: 1rem;
}

/* Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: linear-gradient(145deg, 
        rgba(20, 15, 10, 0.98),
        rgba(35, 25, 15, 0.95));
    border: 1px solid rgba(180, 140, 80, 0.3);
    border-radius: 6px;
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.user-dropdown.active {
    display: block;
}

.dropdown-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(180, 140, 80, 0.15);
}

.dropdown-header h4 {
    font-family: 'Cinzel', serif;
    color: #e8d5a3;
    margin-bottom: 0.25rem;
}

.dropdown-header p {
    color: rgba(200, 180, 140, 0.5);
    font-size: 0.8rem;
}

.dropdown-section {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(180, 140, 80, 0.1);
}

.dropdown-section h5 {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    color: rgba(200, 180, 140, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.linked-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-icon {
    width: 24px;
    text-align: center;
}

.account-name {
    color: #c8b48c;
    font-size: 0.9rem;
}

.link-btn, .unlink-btn {
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.link-btn {
    background: rgba(201, 162, 39, 0.2);
    border: 1px solid rgba(201, 162, 39, 0.4);
    color: #c9a227;
}

.link-btn:hover {
    background: rgba(201, 162, 39, 0.3);
}

.unlink-btn {
    background: rgba(180, 50, 50, 0.2);
    border: 1px solid rgba(180, 50, 50, 0.4);
    color: #e8a3a3;
}

.unlink-btn:hover:not(:disabled) {
    background: rgba(180, 50, 50, 0.3);
}

.unlink-btn:disabled,
.link-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.discord-account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #5865F2;
}

.account-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-actions {
    padding: 1rem 1.25rem;
}

.dropdown-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.dropdown-btn:last-child {
    margin-bottom: 0;
}

.logout-btn {
    background: rgba(180, 140, 80, 0.15);
    border: 1px solid rgba(180, 140, 80, 0.3);
    color: #c8b48c;
}

.logout-btn:hover {
    background: rgba(180, 140, 80, 0.25);
}

.delete-btn {
    background: rgba(180, 50, 50, 0.15);
    border: 1px solid rgba(180, 50, 50, 0.3);
    color: #e8a3a3;
}

.delete-btn:hover {
    background: rgba(180, 50, 50, 0.25);
}

/* Login Button (when not logged in) */
.login-btn {
    background: linear-gradient(145deg, 
        rgba(201, 162, 39, 0.2),
        rgba(180, 140, 80, 0.15));
    border: 1px solid rgba(201, 162, 39, 0.4);
    color: #c9a227;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.login-btn:hover {
    background: linear-gradient(145deg, 
        rgba(201, 162, 39, 0.3),
        rgba(180, 140, 80, 0.25));
    transform: translateY(-1px);
    text-decoration: none;
}

/* Delete Account Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(145deg, 
        rgba(20, 15, 10, 0.98),
        rgba(35, 25, 15, 0.95));
    border: 2px solid rgba(180, 50, 50, 0.4);
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h3 {
    font-family: 'Cinzel', serif;
    color: #e8a3a3;
    margin-bottom: 1rem;
}

.modal-content p {
    color: rgba(200, 180, 140, 0.7);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn {
    background: rgba(180, 140, 80, 0.15);
    border: 1px solid rgba(180, 140, 80, 0.3);
    color: #c8b48c;
}

.confirm-delete-btn {
    background: rgba(180, 50, 50, 0.3);
    border: 1px solid rgba(180, 50, 50, 0.5);
    color: #fff;
}

.confirm-delete-btn:hover {
    background: rgba(180, 50, 50, 0.5);
}

/* ============================================ */
/* Solana Wallet Integration Styles */
/* ============================================ */

.wallet-section h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wallet-section h5::before {
    content: '◎';
    color: #9945FF;
}

/* Wallet Connect Button */
.wallet-connect {
    margin-top: 0.5rem;
}

.connect-wallet-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, #9945FF 0%, #14F195 100%);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.connect-wallet-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(153, 69, 255, 0.4);
}

.connect-wallet-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.wallet-icon {
    font-size: 1.1rem;
}

/* Wallet Not Installed */
.wallet-not-installed {
    text-align: center;
    padding: 0.5rem 0;
}

.wallet-notice {
    color: rgba(200, 180, 140, 0.6);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.install-wallet-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(153, 69, 255, 0.2);
    border: 1px solid rgba(153, 69, 255, 0.4);
    border-radius: 4px;
    color: #9945FF;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.install-wallet-btn:hover {
    background: rgba(153, 69, 255, 0.3);
    text-decoration: none;
}

/* Linked Wallet Display */
.wallet-linked {
    margin-top: 0.5rem;
}

.wallet-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: rgba(153, 69, 255, 0.1);
    border: 1px solid rgba(153, 69, 255, 0.25);
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.wallet-address .wallet-icon {
    color: #9945FF;
    font-size: 1rem;
}

.wallet-addr {
    flex: 1;
    color: #c8b48c;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.copy-btn {
    background: none;
    border: none;
    color: rgba(200, 180, 140, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.copy-btn:hover {
    color: #c9a227;
}

/* Wallet Balances */
.wallet-balances {
    margin-bottom: 0.75rem;
}

.balance-loading {
    color: rgba(200, 180, 140, 0.5);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.5rem;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(180, 140, 80, 0.1);
}

.balance-row:last-child {
    border-bottom: none;
}

.balance-label {
    color: rgba(200, 180, 140, 0.7);
    font-size: 0.8rem;
}

.balance-value {
    color: #14F195;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Unlink Wallet Button */
.unlink-wallet-btn {
    width: 100%;
    padding: 0.5rem;
    background: rgba(180, 50, 50, 0.15);
    border: 1px solid rgba(180, 50, 50, 0.3);
    border-radius: 4px;
    color: #e8a3a3;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unlink-wallet-btn:hover {
    background: rgba(180, 50, 50, 0.25);
}

/* ============================================ */
/* Toast Notifications                          */
/* ============================================ */

.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1.15rem;
    border-radius: 5px;
    font-size: 0.85rem;
    color: #e8d5a3;
    background: rgba(20, 15, 10, 0.95);
    border: 1px solid rgba(180, 140, 80, 0.3);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 340px;
}

.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-exit {
    opacity: 0;
    transform: translateX(30px);
}

.toast-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}

.toast-msg {
    flex: 1;
    line-height: 1.35;
}

.toast-success { border-color: rgba(50, 180, 80, 0.5); }
.toast-success .toast-icon { color: #5fdb6e; }

.toast-error { border-color: rgba(180, 50, 50, 0.5); }
.toast-error .toast-icon { color: #e86060; }

.toast-info { border-color: rgba(80, 140, 200, 0.5); }
.toast-info .toast-icon { color: #6ab0e8; }

.toast-warning { border-color: rgba(200, 160, 40, 0.5); }
.toast-warning .toast-icon { color: #c9a227; }

/* ============================================ */
/* Button Spinner                               */
/* ============================================ */

.btn-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(200, 180, 140, 0.3);
    border-top-color: #c9a227;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================ */
/* Inline Confirm                               */
/* ============================================ */

.confirming {
    font-size: 0.7rem !important;
    white-space: nowrap;
}

.confirm-yes, .confirm-no {
    cursor: pointer;
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
    font-weight: 600;
    transition: background 0.15s ease;
}

.confirm-yes {
    color: #e86060;
}

.confirm-yes:hover {
    background: rgba(180, 50, 50, 0.3);
}

.confirm-no {
    color: #c8b48c;
}

.confirm-no:hover {
    background: rgba(180, 140, 80, 0.2);
}

/* ============================================ */
/* Delete Account Modal                         */
/* ============================================ */

.delete-modal {
    border-color: rgba(180, 50, 50, 0.5) !important;
}

.delete-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: #e86060;
    text-shadow: 0 0 20px rgba(232, 96, 96, 0.35);
}

.captcha-box {
    margin-bottom: 1.5rem;
    text-align: center;
}

.captcha-label {
    display: block;
    font-size: 0.8rem;
    color: rgba(200, 180, 140, 0.6);
    margin-bottom: 0.75rem;
}

.captcha-question {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: #e8d5a3;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.captcha-input {
    width: 120px;
    padding: 0.6rem 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(180, 140, 80, 0.35);
    border-radius: 4px;
    color: #e8d5a3;
    font-size: 1.1rem;
    text-align: center;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: border-color 0.2s ease;
}

.captcha-input:focus {
    border-color: #c9a227;
}

.captcha-error {
    color: #e86060;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    min-height: 1.1em;
}

.confirm-delete-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================ */
/* Responsive                                   */
/* ============================================ */

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.4rem;
    }

    .toast-container {
        top: auto;
        bottom: 1rem;
        right: 0.75rem;
        left: 0.75rem;
    }

    .toast {
        max-width: 100%;
    }
}
