* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', 'Arial', sans-serif;
}

:root {
    --green: #9bba3c;
    --green-dark: #7f9a2c;
    --red: #ef4444;
    --gray-bg: #f5f5f5;
    --border-gray: #e4e4e7;
}

body {
    background: #fff;
    min-height: 100vh;
    padding: 16px;
    color: #111;
    overflow-x: hidden;
}

/* Küçük mobil cihazlar için */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }
}

/* Ana container */
.login-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

h1 {
    font-size: clamp(36px, 8vw, 64px);
    line-height: 1.05;
    font-weight: 700;
    margin-top: clamp(40px, 15vw, 120px);
    letter-spacing: -1.5px;
}

.subtitle {
    margin-top: 20px;
    font-size: clamp(16px, 4vw, 22px);
    line-height: 1.4;
    color: #7b7b86;
    margin-bottom: 40px;
}

/* Telefon wrapper */
.phone-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.country-box {
    min-width: 110px;
    height: 70px;
    border: 2px solid var(--border-gray);
    border-radius: 38px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 16px;
    background: #fff;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s;
}

.country-box:hover {
    border-color: var(--green);
}

.country-box::after {
    content: "⌄";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: #6f6f76;
}

.flag {
    font-size: 14px;
    margin-bottom: 3px;
    color: #6b6b73;
}

.code-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.flag-icon {
    font-size: 18px;
}

.code {
    font-size: 16px;
    font-weight: 700;
    color: #202027;
}

.phone-box {
    flex: 1;
    min-width: 180px;
}

/* Input kutuları */
.input-box {
    position: relative;
    margin-bottom: 20px;
}

.input-box input {
    width: 100%;
    height: 70px;
    border-radius: 38px;
    border: 2px solid var(--border-gray);
    background: #fff;
    padding: 0 24px;
    font-size: clamp(18px, 5vw, 28px);
    outline: none;
    transition: all 0.2s ease;
}

.input-box input:focus {
    border-color: var(--green);
}

.input-box input:hover {
    border-color: #cbd5e1;
}

.input-box input::placeholder {
    color: #9a9aa3;
    font-size: clamp(16px, 4vw, 22px);
}

/* Hata mesajları */
.error-text {
    font-size: 13px;
    color: var(--red);
    margin-top: 6px;
    margin-left: 20px;
    margin-bottom: 4px;
    word-break: break-word;
}

/* Göz ikonu */
#togglePassword {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    cursor: pointer;
    padding: 8px;
    box-sizing: content-box;
    transition: opacity 0.2s;
}

#togglePassword:hover {
    opacity: 0.7;
}

/* Şifremi unuttum */
.forgot {
    color: var(--green);
    font-size: clamp(16px, 4vw, 20px);
    font-weight: 600;
    margin-top: 4px;
    margin-bottom: 32px;
    cursor: pointer;
    display: inline-block;
    transition: opacity 0.2s;
}

.forgot:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Butonlar */
#loginBtn,
#continueBtn {
    width: 100%;
    height: 70px;
    border: none;
    border-radius: 40px;
    background: #d9d9d9;
    color: #8a8a8a;
    font-size: clamp(22px, 6vw, 30px);
    font-weight: 700;
    transition: all 0.3s ease;
    margin-bottom: 24px;
    cursor: pointer;
}

#loginBtn.active,
#continueBtn.active {
    background: var(--green);
    color: #fff;
}

#loginBtn.active:hover,
#continueBtn.active:hover {
    background: var(--green-dark);
    transform: scale(1.02);
}

#loginBtn:active,
#continueBtn:active {
    transform: scale(0.98);
}

/* Kayıt ol */
.register {
    height: 70px;
    border: 2px solid var(--border-gray);
    border-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(16px, 4vw, 22px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.register:hover {
    background: #f5f5f5;
    border-color: #cbd5e1;
}

.register:active {
    background: #eeeeee;
}

.register span {
    color: var(--green);
    margin-left: 8px;
}

/* Sayfalar (page transitions) */
.page {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    background: #fff;
    z-index: 20;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.18, 1), opacity 0.4s;
    overflow-y: auto;
}

.page.active {
    transform: translateX(0);
    opacity: 1;
}

.page1.active {
    transform: translateX(0);
    opacity: 1;
}

.page2,
.page3,
.page4 {
    padding: 20px;
}

/* SAYFA 3 - Loading */
.page3 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.top-icons {
    width: 100%;
    padding: 16px 16px 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.help-icon {
    width: 28px;
    height: 28px;
    border: 2px solid #7b8190;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #7b8190;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.help-icon:hover {
    background: #f0f0f0;
    border-color: var(--green);
    color: var(--green);
}

.close-icon {
    font-size: 36px;
    color: #7b8190;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.close-icon:hover {
    color: #111;
}

.loading-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 60vh;
}

.loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top: 6px solid var(--green);
    border-right: 6px solid var(--green);
    animation: spin 0.8s linear infinite;
    margin-bottom: 32px;
}

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

.loading-wrapper h2 {
    text-align: center;
    font-size: clamp(22px, 5vw, 28px);
    line-height: 1.3;
    color: #111827;
    font-weight: 700;
    margin-bottom: 16px;
}

.loading-wrapper p {
    text-align: center;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

/* SAYFA 4 - Onay */
.page4 {
    background: #f7f7f7;
}

.page4-top {
    width: 100%;
    text-align: right;
    padding: 20px 20px 0;
    font-size: 34px;
    color: #202027;
    cursor: pointer;
    transition: color 0.2s;
}

.page4-top:hover {
    color: #000;
}

.confirm-card {
    width: 95%;
    max-width: 500px;
    background: #fff;
    margin: 20px auto;
    border-radius: 28px;
    padding: 32px 20px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.confirm-card h2 {
    font-size: clamp(40px, 8vw, 64px);
    font-weight: 700;
    color: #111827;
    margin-bottom: 40px;
}

.confirm-text {
    text-align: center;
    font-size: clamp(18px, 4.5vw, 22px);
    line-height: 1.5;
    color: #1f2937;
    margin-bottom: 40px;
}

.confirm-buttons {
    display: flex;
    gap: 14px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.yes-btn,
.no-btn {
    flex: 1;
    height: 64px;
    border-radius: 18px;
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.yes-btn:hover {
    background: var(--green-dark);
    transform: scale(1.02);
}

.no-btn:hover {
    background: #f9f9f9;
    border-color: #cbd5e1;
}

.yes-btn:active,
.no-btn:active {
    transform: scale(0.97);
}

.yes-btn {
    background: var(--green);
    border: none;
    color: #fff;
}

.no-btn {
    background: #fff;
    border: 2px solid #d1d5db;
    color: #111827;
}

.confirm-line {
    width: 100%;
    height: 1px;
    background: #ececec;
    margin-bottom: 35px;
}

.security-info {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}

.security-icon {
    min-width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f3f5ee;
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}

.security-info p {
    font-size: clamp(15px, 4vw, 18px);
    line-height: 1.5;
    color: #1f2937;
    flex: 1;
}

.security-info span {
    color: var(--green);
    font-weight: 700;
}

.bottom-logo {
    width: 34px;
    height: 34px;
    background: var(--green);
    color: #fff;
    border-radius: 8px;
    margin: 30px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

/* POPUP'lar */
.success-popup,
.fail-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    overflow: auto;
}

.success-popup.active,
.fail-popup.active {
    display: block;
}

.success-overlay,
.fail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.success-box,
.fail-box {
    position: relative;
    width: 92%;
    max-width: 450px;
    margin: 60px auto;
    background: #fff;
    border-radius: 34px;
    padding: 24px 20px 34px;
    z-index: 2;
    animation: popupUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.success-top,
.fail-top {
    text-align: right;
    font-size: 40px;
    color: #111;
    cursor: pointer;
}

.fail-top {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    align-items: center;
}

.fail-help {
    width: 38px;
    height: 38px;
    border: 2px solid #6b7280;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #6b7280;
}

.success-icon-wrap,
.fail-icon-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 10px auto 25px;
}

.success-ring,
.fail-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #f3f4f6;
    animation: ringPulse 2s infinite;
}

.success-icon {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: #7fb539;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 90px;
    font-weight: 700;
    animation: iconPop 0.5s ease;
}

.fail-icon {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 95px;
    font-weight: 300;
    animation: iconPop 0.5s ease;
}

.dot,
.plus,
.fail-dot,
.fail-plus {
    position: absolute;
    animation: float 3s ease-in-out infinite;
}

.dot,
.fail-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9bd27d;
}

.fail-dot {
    background: #f87171;
}

.dot1,
.fail-dot1 {
    left: -8px;
    top: 70px;
}

.dot2,
.fail-dot2 {
    right: -8px;
    top: 100px;
}

.plus,
.fail-plus {
    font-size: 32px;
    font-weight: 700;
    color: #7fb539;
}

.fail-plus {
    color: #ef4444;
}

.plus1,
.fail-plus1 {
    right: 10px;
    top: 10px;
}

.plus2,
.fail-plus2 {
    left: 5px;
    bottom: 15px;
}

.success-box h2 {
    font-size: 40px;
    text-align: center;
}

.success-box h3 {
    font-size: 24px;
    text-align: center;
    margin: 10px 0 20px;
}

.success-desc,
.fail-desc {
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
    color: #4b5563;
    margin: 20px 0;
}

.success-btn,
.fail-btn {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 18px;
    background: #7fb539;
    color: white;
    font-size: 26px;
    font-weight: 700;
    margin: 15px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.success-btn:hover {
    background: #6a9a2e;
}

.fail-btn {
    background: var(--red);
}

.fail-btn:hover {
    background: #dc2626;
}

.success-info {
    background: #f5f7f9;
    border-radius: 24px;
    padding: 18px;
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.info-circle {
    min-width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #7fb539;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #7fb539;
}

/* Animations */
@keyframes popupUp {
    0% {
        transform: scale(0.9) translateY(40px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes iconPop {
    0% {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }
    80% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes ringPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Tablet ve Masaüstü iyileştirmeleri */
@media (min-width: 768px) {
    body {
        padding: 32px;
    }
    .login-container {
        max-width: 550px;
    }
    .input-box input,
    #loginBtn,
    #continueBtn,
    .register {
        height: 78px;
    }
    .country-box {
        height: 74px;
    }
}

@media (min-width: 1024px) {
    .login-container {
        max-width: 580px;
    }
    .success-box,
    .fail-box {
        max-width: 500px;
    }
}

/* Dokunma iyileştirmeleri */
button,
.register,
.forgot,
.close-icon,
.page4-top,
.success-top,
.fail-close {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}