/* CSS переменные для темной темы */
:root {
    --bg-color: #F9F6FE;
    --card-bg: white;
    --text-color: #000000;
    --text-secondary: #666666;
    --footer-bg: white;
}

html.dark-theme {
    --bg-color: #0F0D12;
    --card-bg: #1E1B22;
    --text-color: #ffffff;
    --text-secondary: #b5b5b5;
    --footer-bg: #1f1f1f;
}

button, select, option{
    color: var(--text-color);
    background-color: var(--card-bg);
    transition: all 0.3s ease;
}
.block-payment {
    width: 100%;
    min-height: 80vh;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.input-with-icon {
    position: relative;
    display: inline-block;
    width: 100%;
}

.input-with-icon input {
    width: 100%;
    box-sizing: border-box;
}

.input-with-icon::after {
    content: "₽";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
    pointer-events: none;
}
.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.payment-container {
    width: 577px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    transition: all 0.3s ease;
}
.payment-container form {
    display: flex;
    flex-direction: column;
}
.payment-container form input{
    display: flex;
    flex-direction: column;
    width: 463px;
    height: 46px;
    border-radius: 10px;
    border: 1px solid #8000FF;
    background-color: var(--input-bg);
    color: var(--text-color);
    text-align: center;
    font-family: 'Rubik';
    font-size: 18px;
    transition: all 0.3s ease;
}

/* Темная тема для input в payment-container */
html.dark-theme .payment-container form input {
    border-color: #3E3946;
}
.payment-container form button {
    width: 463px;
    height: 46px;
    padding: 12px;
    background: #8000FF;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Rubik';
    font-weight: 500;
    margin-top: 16px;
}

/* Темная тема для button в payment-container */
html.dark-theme .payment-container form button {
    background: #B89FDF;
}

.payment-container form button:hover {
    opacity: .85;
}

.payment-container form input:focus {
    outline: none;
}

.payment-container a {
    font-family: 'Rubik';
    font-size: 16px;
    font-weight: 400;
    color: var(--text-color);
    margin-top: 14px;
    transition: color 0.3s ease;
}

.payment-container div {
    font-family: 'Inter';
    font-size: 12px;
    color: #888888;
    text-align: center;
    line-height: 17px;
}

/* Header на странице payment */
header {
    background-color: var(--header-bg);
    transition: background-color 0.3s ease;
}

.header-title-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
}

.payment-theme-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}
.vk-auth-btn:hover {
    opacity: 0.80;
}
.links-login {
    width: 78%;
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 32px;
}
.links-login a{
    font-family: "Rubik";
    font-size: 14px;
    text-decoration: none;
    color: black;
}
.links-register {
    width: 78%;
    margin-top: 12px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 32px;
}
.links-register a{
    font-family: "Rubik";
    font-size: 14px;
    text-decoration: none;
    color: black;
}

@media (max-width: 630px) {
    .payment-container {
        width: 92%;
    }
    .payment-container form {
        width: 82.2%;
    }
    .payment-container form button {
        width: 100%;
    }
    .payment-container form input {
        width: 100%;
    }
}

@media (max-width: 440px) {
    .payment-container form button {
        height: 43px;
    }
    .payment-container form input {
        height: 43px;
    }
    .payment-container form button {
        font-size: 15px;
    }
}

@media (max-width: 350px) {
    .payment-container h2 {
        font-size: 20px;
    }
}

/* Стили для сообщений Django */
.messages-container {
    width: 100%;
    max-width: 100%;
}

.alert {
    padding: 12px 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    font-family: 'Rubik', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    max-width: 100%;
    position: relative;
    animation: slideIn 0.3s ease-out forwards;
}

.alert-success {
    background-color: #E6F7ED;
    border-left: 4px solid #2ECE7A;
    color: #156843;
}

.alert-error, .alert-danger {
    background-color: #FFECEE;
    border-left: 4px solid #FF466C;
    color: #B82E49;
}

.alert-warning {
    background-color: #FFF8E6;
    border-left: 4px solid #FFC107;
    color: #856404;
}

.alert-info {
    background-color: #E6EEFB;
    border-left: 4px solid #4B89DC;
    color: #1A4B8F;
}

/* Темная тема для алертов */
html.dark-theme .alert {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

html.dark-theme .alert-success {
    background-color: #1a3d2e;
    border-left-color: #2ECE7A;
    color: #4ade80;
}

html.dark-theme .alert-error,
html.dark-theme .alert-danger {
    background-color: #3d1f24;
    border-left-color: #FF466C;
    color: #ff6b8a;
}

html.dark-theme .alert-warning {
    background-color: #3d3520;
    border-left-color: #FFC107;
    color: #ffd54f;
}

html.dark-theme .alert-info {
    background-color: #1a2332;
    border-left-color: #4B89DC;
    color: #6ba3e8;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.privacy-policy-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Rubik', sans-serif;
    line-height: 1.6;
}

.privacy-policy-container h1 {
    color: #8000FF;
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.privacy-policy-container h2 {
    color: #8000FF;
    font-size: 20px;
    margin: 25px 0 15px 0;
    font-family: 'Montserrat', sans-serif;
}

.privacy-policy-container p {
    margin-bottom: 15px;
    color: #333333;
}

.privacy-policy-container ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.privacy-policy-container li {
    margin-bottom: 8px;
}

.privacy-policy-container a {
    color: #8000FF;
    text-decoration: none;
}

.privacy-policy-container a:hover {
    text-decoration: underline;
}

.policy-date {
    text-align: right;
    font-style: italic;
    color: #888888;
    margin-top: 30px;
}

@media (max-width: 850px) {
    .privacy-policy-container {
        margin: 20px;
        padding: 20px;
    }
}

@media (max-width: 500px) {
    .privacy-policy-container h1 {
        font-size: 24px;
    }
    
    .privacy-policy-container h2 {
        font-size: 18px;
    }
}

/* Переключатель темы */
.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.theme-checkbox {
    display: none;
}

/* Трек переключателя - светлая тема */
.toggle-track {
    width: 64px;
    height: 32px;
    background: rgba(47, 47, 47, 1);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Темная тема - трек становится фиолетовым */
.theme-checkbox:checked + .toggle-track {
    background: #B89FDF;
    border-color: #B89FDF;
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* В темной теме, изменяем фон thumb и двигаем его */
.theme-checkbox:checked + .toggle-track .toggle-thumb {
    transform: translateX(32px);
    background: #1B191E;
}

.toggle-thumb img {
    position: absolute;
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Солнце - видимо в светлой теме */
.toggle-thumb .sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Луна - скрыта в светлой теме */
.toggle-thumb .moon-icon {
    opacity: 0;
    transform: scale(0.5) rotate(30deg);
}

/* Темная тема - показываем луну, скрываем солнце */
.theme-checkbox:checked + .toggle-track .toggle-thumb .sun-icon {
    opacity: 0;
    transform: scale(0.5) rotate(-30deg);
}

.theme-checkbox:checked + .toggle-track .toggle-thumb .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

@media (max-width: 768px) {
    .toggle-track {
        width: 58px;
        height: 30px;
    }
    
    .toggle-thumb {
        width: 22px;
        height: 22px;
    }
    
    .theme-checkbox:checked + .toggle-track .toggle-thumb {
        transform: translateX(28px);
    }
    
    .toggle-thumb img {
        width: 14px;
        height: 14px;
    }
}