/* Profile Page Specific Styles */
body {
    /* Ensure theme variables from styles.css are used */
}

.profile-section {
    padding: 100px 0 60px; /* Adjust padding similar to wallet.html, considering fixed navbar */
    min-height: calc(100vh - 70px - 70px); /* Full viewport height minus navbar and footer */
    display: flex;
    flex-direction: column;
}

.profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.profile-header h2 {
    font-size: 2.5em;
    color: var(--primary-color);
}

.profile-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: start;
}

.profile-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

/* User Info Card */
.user-info-card {
    text-align: center;
}

.avatar-container {
    margin-bottom: 20px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    object-fit: cover;
}

.username-display {
    font-size: 1.8em;
    color: var(--text-color);
    margin-bottom: 10px;
}

.balance-container p {
    font-size: 1.2em;
    color: var(--text-color);
}

.balance-container #userBalance {
    font-weight: bold;
    color: var(--primary-color);
}

/* Account Security Card */
.account-security-card h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.settings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-list li {
    margin-bottom: 15px;
}

.settings-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    text-align: left;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
}

.settings-button:hover {
    background-color: var(--bg-color); /* Slightly different from card for hover effect */
    border-color: var(--primary-color);
}

.settings-button i {
    margin-right: 15px;
    font-size: 1.2em;
    color: var(--primary-color);
    width: 20px; /* Fixed width for icon alignment */
    text-align: center;
}

/* Modal Styles (shared with styles.css, but can be overridden or extended here) */
/* Change Password Modal specific styles */
.security-verification-step {
    text-align: center;
    padding: 20px;
}

.security-verification-step h4 {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.security-verification-step p {
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: 15px;
}

/* Spinner for verification animation */
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Ensure modal form elements use theme variables */
#changePasswordModal .modal-content {
    background-color: var(--card-bg); /* Use card-bg for modal consistency */
}

#changePasswordModal .form-group label {
    color: var(--text-color);
}

#changePasswordModal .form-group input {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

#changePasswordModal .form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb, 41, 98, 255), 0.1); /* Use RGB for primary color if available */
}

#changePasswordModal h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

/* Footer (minimal styling, assumes styles.css handles most) */
footer {
    text-align: center;
    padding: 20px 0;
    background-color: var(--nav-bg); /* Consistent with navbar background */
    border-top: 1px solid var(--border-color);
    margin-top: auto; /* Pushes footer to bottom if content is short */
}

/* Responsive adjustments for profile page */
@media (max-width: 768px) {
    .profile-header h2 {
        font-size: 2em;
    }
    .profile-layout {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }
    .profile-card {
        padding: 20px;
    }
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    .username-display {
        font-size: 1.5em;
    }
    .balance-container p {
        font-size: 1em;
    }
    .settings-button {
        padding: 12px;
        font-size: 0.9em;
    }
    .settings-button i {
        margin-right: 10px;
    }
}

/* Enhanced Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 520px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: var(--text-color-secondary, #8e8e8e);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
}

.close-btn:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

/* Modal Headers */
.modal-content h2 {
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    padding-right: 40px;
}

.modal-content h4 {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 16px;
}

/* Agreement Section */
.agreement-text {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    max-height: 300px;
    overflow-y: auto;
}

.agreement-text ol {
    padding-left: 24px;
    margin: 16px 0;
}

.agreement-text li {
    margin-bottom: 16px;
    line-height: 1.6;
    color: var(--text-color-secondary, #4a4a4a);
}

.agreement-text strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Form Groups and Inputs */
.form-group {
    margin: 24px 0;
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    vertical-align: middle;
}

.form-group label {
    color: var(--text-color-secondary, #4a4a4a);
    font-size: 15px;
    vertical-align: middle;
}

/* Button Container */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

@media (min-width: 480px) {
    .modal-actions {
        flex-direction: row;
        justify-content: flex-end;
        gap: 20px;
    }
}

/* Enhanced Button Styles */
.cta-button {
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

@media (min-width: 480px) {
    .cta-button {
        width: auto;
        min-width: 140px;
    }
}

/* Primary Button */
.cta-button:not(.cta-button-danger):not(.cta-button-secondary) {
    background-color: #2196f3;
    color: white;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.cta-button:not(.cta-button-danger):not(.cta-button-secondary):hover {
    background-color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.3);
}

/* Danger Button */
.cta-button.cta-button-danger {
    background-color: #ff4757;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.2);
}

.cta-button.cta-button-danger:hover {
    background-color: #e0404e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 71, 87, 0.3);
}

/* Secondary Button */
.cta-button.cta-button-secondary {
    background-color: #f1f2f6;
    color: #2d3436;
    border: 1px solid #dfe4ea;
}

.cta-button.cta-button-secondary:hover {
    background-color: #dfe4ea;
    transform: translateY(-2px);
}

/* Dark mode support for secondary button */
body.dark-mode .cta-button.cta-button-secondary {
    background-color: #353b48;
    color: #ffffff;
    border-color: #454d5d;
}

body.dark-mode .cta-button.cta-button-secondary:hover {
    background-color: #454d5d;
}

/* Disabled Button States */
.cta-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(33, 150, 243, 0.1);
    border-left-color: #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 24px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Delete Account Button in Settings */
.settings-button.settings-button-danger {
    color: #ff4757;
    transition: all 0.2s ease;
}

.settings-button.settings-button-danger:hover {
    background-color: rgba(255, 71, 87, 0.1);
}

/* Form Input Fields */
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.form-group input[type="password"]:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    outline: none;
}

/* Delete Steps */
.delete-step {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Status Messages */
#deleteStatusTitle {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

#deleteStatusMessage {
    color: var(--text-color-secondary, #4a4a4a);
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        padding: 24px;
    }
    
    .agreement-text {
        padding: 16px;
        max-height: 250px;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    .agreement-text li {
        font-size: 14px;
    }
} 