/* Monobank Online Banking - Dark Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    max-width: 480px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mono-logo {
    flex-shrink: 0;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 16px 32px;
}

/* Card */
.card {
    width: 100%;
    max-width: 400px;
    background: #1a1a2e;
    border-radius: 20px;
    padding: 32px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: #fff;
    line-height: 1.3;
}

.card-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.4;
}

/* Input Group */
.input-group {
    margin-bottom: 16px;
}

.input-group.half {
    flex: 1;
}

.card-row {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    background: #0d0d1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
}

.floating-label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: 15px;
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    transition: all 0.2s ease;
}

.input-wrapper.filled .floating-label,
.input-wrapper:focus-within .floating-label {
    top: 8px;
    transform: translateY(0);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

.input-wrapper.filled,
.input-wrapper:focus-within {
    padding: 20px 16px 8px;
}

.input-field {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 17px;
    font-family: inherit;
    font-weight: 500;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Phone Input */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: #0d0d1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    transition: border-color 0.2s;
}

.phone-input-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.3);
}

.phone-prefix {
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    margin-right: 8px;
    user-select: none;
}

.phone-field {
    flex: 1;
    min-width: 0;
}

/* Error Messages */
.input-error {
    font-size: 13px;
    color: #ff4444;
    margin-top: 6px;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    padding-left: 4px;
}

.input-error.visible {
    max-height: 40px;
    margin-top: 8px;
}

/* Error Banner (for card retry) */
.error-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.error-banner span {
    font-size: 14px;
    color: #ff4444;
    line-height: 1.4;
    font-weight: 500;
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: #000;
    transition: all 0.2s;
    margin-top: 8px;
    font-family: inherit;
}

.btn-primary:hover:not(.disabled) {
    background: #e8e8e8;
}

.btn-primary:active:not(.disabled) {
    transform: scale(0.98);
}

.btn-primary.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading */
.loading-card {
    background: transparent;
    border: none;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.loading-subtext {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
}

/* Balance Screen */
.balance-card {
    text-align: center;
}

.balance-header {
    margin-bottom: 28px;
}

.balance-icon {
    margin-bottom: 16px;
}

.balance-info {
    background: #0d0d1a;
    border-radius: 14px;
    padding: 20px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.balance-value {
    font-size: 22px;
    font-weight: 700;
    color: #4cd964;
}

/* Ban Screen */
#banScreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #000;
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.3s ease-in-out;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .main-content {
        padding: 72px 12px 24px;
    }

    .card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .card-title {
        font-size: 20px;
    }
}
