* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    color: black;
}

body {
    background: #FFFFFF;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    text-align: center;
    width: 100%;
    padding: 40px;
    position: relative;
    top: 0;
    left: 0;
    z-index: 1;
}

.header h1 {
    font-size: 24px;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

.container {
    max-width: auto;
    width: 100%;
    padding: 20px;
    padding-bottom: 100px;
    /* box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); */
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.card {
    background: #FFFFFF;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    /* box-shadow: 0 4px 15px rgba(87, 84, 237, 0.1); */
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.input {
    width: 100%;
    padding: 12px 15px;
    border: solid 1px #C7C7C7;
    border-radius: 23px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
}

.input.active {
    border: solid 1px #E5FF4F;
}

.input-group {
    display: flex;
    gap: 10px;
}

input[type="checkbox"] {
    appearance: checkbox; /* Использовать системный вид для неактивного состояния */
    width: 20px;
    height: 20px;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    appearance: none;
    background-color: #5754ED; /* Цвет фона для отмеченного состояния */
    border: 2px solid #5754ED;
    border-radius: 3px;
    position: relative;
}

input[type="checkbox"]:checked::after {
    content: '✔';
    color: white;
    position: absolute;
    left: 3px;
    top: 0px;
    font-size: 14px;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: #E5FF4F;
    /* border: solid 1px #C7C7C7; */
    border:none;
    border-radius: 23px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover, .btn-secondary:hover {
    border: solid 1px #C7C7C7;
}

.btn-secondary {
    padding: 12px 20px;
    background: #E5FF4F;
    /* border: solid 1px #C7C7C7; */
    border:none;
    border-radius: 23px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s;
}

.participants-list {
    margin-bottom: 10px;
}

.participant-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 23px;
    margin: 5px 5px 5px 0;
    font-size: 14px;
    border: solid 1px #C7C7C7;
}

.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 5px;
    margin-bottom: 20px;
}

.tab-btn, .tab-btn-add {
    flex: 1;
    padding: 10px;
    margin: 10px;
    background: none;
    border: #C7C7C7;
    cursor: pointer;
    border-radius: 23px;
    transition: background 0.3s;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
}

.tab-btn-add {
    background: #E5FF4F;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.expense-item, .debt-item {
    background: white;
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 10px;
}

.expense-desc {
    font-weight: 600;
    margin-bottom: 5px;
}

.expense-details {
    font-size: 14px;
    color: #36454F;
}

.debt-amount {
    font-weight: 600;
    color: #e74c3c;
    margin-top: 5px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #36454F;
    font-weight: normal;
}

.trip-summary {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 15px;
    margin-top: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    color: #222222;
    margin-bottom: 5px;
}

.saved-trip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 255, 79, 0.3);
    border-color: #5754ED;
}

#continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 255, 79, 0.3);
}



.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 25px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

/* Детали долга */
.debt-summary {
    background: linear-gradient(135deg, rgba(229, 255, 79, 0.1), rgba(87, 84, 237, 0.05));
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.debt-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
}

.debt-item .from,
.debt-item .to {
    font-weight: 600;
    color: #222;
}

.debt-item .arrow {
    color: #5754ED;
    font-weight: bold;
}

.debt-item .amount {
    background: #E5FF4F;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    color: #222;
}

/* Шаги оплаты */
.payment-steps {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.payment-steps ol {
    padding-left: 20px;
    margin-top: 10px;
}

.payment-steps li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Кнопки оплаты */
.payment-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-success {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 23px;
    font-weight: 600;
    cursor: pointer;
}

/* Банковские кнопки */
.bank-quick-links {
    margin-top: 20px;
}

.bank-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.bank-btn {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    font-size: 14px;
}

.bank-btn.tinkoff { border-color: #FFDD2D; color: #222; }
.bank-btn.sber { border-color: #21A038; color: #21A038; }
.bank-btn.vtb { border-color: #0C3D8A; color: #0C3D8A; }
.bank-btn.alfa { border-color: #EF3124; color: #EF3124; }

/* Список долгов с кнопками */
.debt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #E5FF4F;
}

.debt-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.debt-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pay-btn {
    background: #5754ED;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.paid-badge {
    background: #4CAF50;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

/* Анимация тоста */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}
