/* ========================================================
   page-edit-username.css
   Edit Username Page Styles
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #1688d1;
  --color-primary-dark: #0c5fa8;
  
  --color-success: #2e7d32;
  --color-success-light: #4ade80; 
  --color-success-bg: #e8f5e9;
  
  --color-danger: #cc1f1f;
  --color-danger-bg: #ffecec;

  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  
  --color-text: #181c20;
  --color-text-secondary: #5a646e;
  --color-label: #0b2940; 
  --color-border: #dee2e6;
  
  --color-bg: #f9f9fb;
  --color-surface: #ffffff;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;
}

/* PAGE LAYOUT */
.edit-username-main {
    background: var(--color-bg);
    min-height: 100vh;
    padding: 40px 20px;
    font-family: "Inter", sans-serif;
}

.container.edit-username-wrapper,
.edit-username-wrapper {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 40px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
}

/* =========================================================================
   HEADER SECTION
   ========================================================================= */

.form-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.form-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.form-header p {
    font-size: 15px;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* =========================================================================
   LOGIN PROMPT
   ========================================================================= */

.login-prompt {
    text-align: center;
    padding: 60px 20px;
}

.prompt-icon {
    margin-bottom: 20px;
    color: var(--color-text-secondary);
}

.login-prompt h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 12px 0;
}

.login-prompt p {
    font-size: 15px;
    color: var(--color-text-secondary);
    margin: 0 0 24px 0;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: var(--color-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(22, 136, 209, 0.3);
}

.btn-login:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* =========================================================================
   MESSAGES
   ========================================================================= */

.message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.success-message {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid #a5d6a7;
}

.error-message {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid #f5a3a3;
}

/* =========================================================================
   FORM STYLES
   ========================================================================= */

.username-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 15px;
    color: var(--color-label);
}

.form-group .required {
    color: var(--color-danger);
    font-weight: 700;
}

.form-group input[type="text"] {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: #fff;
    font-size: 16px;
    color: var(--color-text);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.form-group input[type="text"]:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22, 136, 209, 0.1);
    outline: none;
}

.form-group input[type="text"]:disabled {
    background: #f5f5f5;
    color: var(--color-text-secondary);
    cursor: not-allowed;
}

.field-note {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* =========================================================================
   SUBMIT BUTTON
   ========================================================================= */

.form-actions {
    margin-top: 8px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 0 24px;
    background: var(--color-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(22, 136, 209, 0.3);
}

.btn-submit:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

/* =========================================================================
   WARNING NOTICE
   ========================================================================= */

.warning-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: var(--color-warning-bg);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: #92400e;
    line-height: 1.5;
}

.warning-notice svg {
    flex-shrink: 0;
    color: var(--color-warning);
    margin-top: 2px;
}

.warning-notice strong {
    font-weight: 700;
}

/* =========================================================================
   COOLDOWN NOTICE (Rate Limit)
   ========================================================================= */

.cooldown-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: #0369a1;
    line-height: 1.6;
    margin-bottom: 20px;
}

.cooldown-notice svg {
    flex-shrink: 0;
    color: #0ea5e9;
    margin-top: 2px;
}

.cooldown-notice strong {
    font-weight: 700;
}

/* =========================================================================
   FORM SECTIONS
   ========================================================================= */

.form-section {
    padding: 28px;
    background: #fafbfc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 6px 0;
}

.section-title svg {
    color: var(--color-primary);
}

.section-desc {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0 0 20px 0;
}

.user-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================================================================
   DANGER SECTION (Account Deletion)
   ========================================================================= */

.danger-section {
    background: #fef2f2;
    border-color: #fecaca;
}

.danger-title {
    color: var(--color-danger);
}

.danger-title svg {
    color: var(--color-danger) !important;
}

.danger-warning {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: #991b1b;
    line-height: 1.5;
}

.danger-warning svg {
    flex-shrink: 0;
    color: var(--color-danger);
    margin-top: 2px;
}

.danger-warning strong {
    font-weight: 700;
    font-size: 15px;
}

.danger-warning ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.danger-warning li {
    margin-bottom: 4px;
}

/* Textarea */
.form-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: #fff;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-text);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
    resize: vertical;
}

.form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22, 136, 209, 0.1);
    outline: none;
}

/* Checkbox */
.checkbox-group {
    margin-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Danger Button */
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 0 24px;
    background: var(--color-danger);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(204, 31, 31, 0.3);
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.btn-danger:active {
    transform: translateY(0);
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 767px) {
    .container.edit-username-wrapper {
        padding: 24px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .edit-username-main {
        padding: 0;
        background: #fff;
    }
    
    .form-header h1 {
        font-size: 22px;
    }
    
    .form-section {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .danger-warning {
        flex-direction: column;
        gap: 10px;
    }
}
