:root {
    --bg-color: #242d34;
    --modal-bg: #000000;
    --text-primary: #e7e9ea;
    --text-secondary: #71767b;
    --border-color: #2f3336;
    --primary-color: #eff3f4;
    --primary-hover: #d7dbdc;
    --blue: #1d9bf0;
    --input-bg: #000000;
    --input-focus: #1d9bf0;
    --error: #f4212e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(91, 112, 131, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    background-color: var(--modal-bg);
    width: 100%;
    max-width: 600px;
    height: 100%;
    max-height: 650px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

@media (max-width: 700px) {
    .modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 53px;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: rgba(239, 243, 244, 0.1);
}

.close-btn svg {
    width: 20px;
    fill: var(--text-primary);
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.logo svg {
    width: 32px;
}

.spacer {
    width: 34px;
}

.modal-content {
    padding: 0 32px 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: 364px;
    margin: 0 auto;
    width: 100%;
}

h1 {
    font-size: 31px;
    font-weight: 700;
    margin: 32px 0;
    line-height: 36px;
}

.mb-4 {
    margin-bottom: 24px;
}

.btn {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
    margin-bottom: 12px;
}

.btn-large {
    height: 52px;
    font-size: 17px;
    border-radius: 26px;
}

.btn-oauth {
    background-color: #fff;
    color: #0f1419;
    border: 1px solid rgb(207, 217, 222);
}

.btn-oauth:hover {
    background-color: #e6e6e6;
}

.btn-oauth img,
.btn-oauth svg {
    width: 20px;
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #0f1419;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(239, 243, 244, 0.1);
}

.divider {
    display: flex;
    align-items: center;
    margin: 12px 0 24px;
    color: var(--text-secondary);
    font-size: 15px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 8px;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
}

.input-group:focus-within {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 1px var(--input-focus);
}

.input-group input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 26px 8px 8px;
    font-size: 17px;
    outline: none;
}

.input-group label {
    position: absolute;
    left: 8px;
    top: 16px;
    color: var(--text-secondary);
    font-size: 17px;
    transition: all 0.2s ease;
    pointer-events: none;
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label,
.input-group.has-value label {
    top: 6px;
    font-size: 13px;
    color: var(--input-focus);
}

.input-group input:not(:focus)+label {
    color: var(--text-secondary);
}

.input-group.disabled-group {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: transparent;
}

.input-group.disabled-group input {
    color: var(--text-secondary);
}

.password-group {
    display: flex;
}

.toggle-password {
    background: none;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.toggle-password svg {
    width: 24px;
}

.forgot-link {
    margin-top: -12px;
    margin-bottom: 24px;
}

.forgot-link a {
    color: var(--blue);
    text-decoration: none;
    font-size: 13px;
}

.forgot-link a:hover {
    text-decoration: underline;
}

.signup-text {
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 15px;
    text-align: left;
}

.signup-text a {
    color: var(--blue);
    text-decoration: none;
}

.signup-text a:hover {
    text-decoration: underline;
}

.flex-spacer {
    flex: 1;
}

.login-footer {
    width: 100%;
    margin-top: auto;
}

.w-100 {
    width: 100%;
}