/* ============================================
   Ascend Login Page - Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #2c2c2c;
    position: relative;
    overflow-x: hidden;
}

/* ---- Background ---- */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 30%, #3a3a3a 50%, #2d2d2d 70%, #1a1a1a 100%);
    z-index: 0;
}

.bg-decoration {
    position: fixed;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    z-index: 1;
    pointer-events: none;
}

/* ---- Logo ---- */
.logo-container {
    position: relative;
    z-index: 2;
    margin-top: 40px;
    margin-bottom: 25px;
    text-align: center;
}

.logo-svg {
    width: 260px;
    height: 50px;
}

/* ---- Login Card ---- */
.login-card {
    position: relative;
    z-index: 2;
    width: 460px;
    max-width: 92vw;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.header-icon {
    width: 28px;
    height: 28px;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* ---- Form ---- */
form {
    padding: 24px;
}

.input-group {
    position: relative;
    margin-bottom: 12px;
}

.input-group input {
    width: 100%;
    padding: 11px 40px 11px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.input-group input:focus {
    border-color: #D32F2F;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

.input-group input::placeholder {
    color: #999;
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* ---- Captcha ---- */
.captcha-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.captcha-display {
    flex-shrink: 0;
}

.captcha-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 26px;
    font-style: italic;
    font-weight: bold;
    color: #333;
    letter-spacing: 3px;
    user-select: none;
    padding: 6px 12px;
    background: #f5f0eb;
    border-radius: 4px;
}

.captcha-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.captcha-input-wrapper:focus-within {
    border-color: #D32F2F;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.1);
}

.captcha-input-wrapper input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #333;
    outline: none;
    background: transparent;
}

.captcha-input-wrapper input::placeholder {
    color: #999;
}

.captcha-refresh-icon {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    cursor: pointer;
}

/* ---- Login Button ---- */
.login-btn {
    background: #D32F2F;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.login-btn:hover {
    background: #b71c1c;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

.login-btn:active {
    transform: scale(0.97);
}

/* ---- Expandable Sections ---- */
.expandable-section {
    border-top: 1px solid #e8e8e8;
}

.expandable-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.expandable-header:hover {
    background: #fafafa;
}

.section-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.expandable-header span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.expandable-section.open .chevron {
    transform: rotate(180deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 24px;
}

.expandable-section.open .expandable-content {
    max-height: 250px;
    padding: 0 24px 20px;
}

.expandable-content p {
    font-size: 13px;
    color: #666;
    margin-bottom: 14px;
    line-height: 1.5;
}

.expandable-content .input-group {
    margin-bottom: 14px;
}

.expandable-content .input-group input {
    padding: 10px 14px;
}

.reset-btn {
    background: #D32F2F;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease;
}

.reset-btn:hover {
    background: #b71c1c;
}

/* ---- Footer ---- */
.footer {
    position: relative;
    z-index: 2;
    margin-top: auto;
    width: 100%;
    padding: 20px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.language-selector {
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 10;
}

.language-selector select {
    padding: 6px 30px 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%23999' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.2s ease;
}

.language-selector select:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.language-selector select option {
    background: #333;
    color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 520px) {
    .login-card {
        width: 95vw;
    }

    .logo-container {
        margin-top: 24px;
        margin-bottom: 16px;
    }

    .logo-svg {
        width: 170px;
        height: 48px;
    }

    .captcha-section {
        flex-direction: column;
        align-items: stretch;
    }

    .bg-decoration {
        display: none;
    }
}
