:root {
    --background: #cdb5e4;
    --foreground: #130b1b;
    --primary: #a234fd;
    --secondary: #130b1b;
    --accent: #cdb5e4;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --gray-dark: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --body-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: transparent !important;
    background-color: transparent !important;
}

/* Mobil viewport fix */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important; /* Mobil için minimum yükseklik */
    max-width: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important; /* Yatay scroll'u engelle */
    overflow-y: auto !important; /* Dikey scroll'a izin ver */
    background: transparent !important;
    background-color: transparent !important;
    -webkit-background-color: transparent !important;
    -moz-background-color: transparent !important;
    -ms-background-color: transparent !important;
    background-image: none !important;
    background-attachment: initial !important;
    -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
}

body {
    color: var(--foreground);
    background: transparent !important;
    background-color: transparent !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh !important;
}

* {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding: 0;
    margin: 0;
    -webkit-tap-highlight-color: transparent; /* Mobil tap highlight kaldır */
}

/* Mobil için container düzeltmeleri */
.pages {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px;
    width: 100%;
    min-height: 100vh !important; /* Tam viewport yüksekliği */
    max-width: 600px;
    margin: 0 auto;
    background: transparent !important;
    background-color: transparent !important;
}

.presale-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    min-height: auto;
    background: transparent !important;
    background-color: transparent !important;
    padding-bottom: env(safe-area-inset-bottom); /* iPhone X+ için */
}

.presale-form {
    background: #1a1320;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    min-height: auto; /* Fixed height kaldırıldı */
}

/* Animation düzeltmeleri - performans için */
@media (max-width: 768px) {
    .presale-form:before {
        animation: none; /* Mobilde animasyonu kapat */
        background: linear-gradient(45deg, #74d1f2, #ae61cc, #fefefe);
    }
    
    .animated-line {
        animation: none; /* Mobilde animasyonu kapat */
        background: linear-gradient(90deg, transparent, #000000, #ffffff, #000000, transparent);
    }
}

/* Input düzeltmeleri - mobil için */
.input-wrapper input {
    width: 100%;
    padding: 15px 90px 15px 15px;
    border: 2px solid rgba(120, 116, 124, .3);
    border-radius: 12px;
    font-size: 16px !important; /* iOS zoom engellemek için */
    background: #78747c0d;
    color: #000;
    transition: all .3s ease;
    -webkit-appearance: none; /* iOS default style kaldır */
    appearance: none;
}

/* Mobil scroll düzeltmeleri */
@media (max-width: 600px) {
    html, body {
        overflow-y: visible !important; /* Scroll'a izin ver */
    }
    
    .pages {
        padding: 15px;
        min-height: auto !important;
        padding-bottom: 30px; /* Alt boşluk */
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .presale-form {
        padding: 20px;
        margin: 0 10px;
        margin-bottom: 20px; /* Alt margin ekle */
    }
    
    .presale-header h2, .presale-header .centeum-highlight {
        font-size: 1.4rem;
    }
    
    .price-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .price-item {
        align-items: center;
        text-align: center;
    }
    
    .method-buttons {
        grid-template-columns: 1fr;
    }
    
    .input-wrapper input {
        font-size: 16px !important; /* Zoom engelle */
    }
    
    .buy-button {
        font-size: 1.1rem;
    }
    
    /* Mobil için presale stats düzeltmesi */
    .presale-stats {
        margin-bottom: 20px; /* Alt boşluk ekle */
    }
}

@media (max-width: 400px) {
    .presale-form {
        padding: 15px;
        margin: 0 5px;
        margin-bottom: 20px;
    }
    
    .pages {
        padding: 10px;
        padding-bottom: 30px;
    }
}

/* iOS Safe Area düzeltmeleri */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .pages {
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
    }
    
    .presale-container {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Viewport height düzeltmesi */
@supports (-webkit-touch-callout: none) {
    /* iOS için özel düzeltme */
    .pages {
        min-height: -webkit-fill-available !important;
    }
}

/* Android keyboard açıldığında düzeltme */
@media screen and (max-height: 450px) {
    .pages {
        min-height: auto !important;
    }
    
    .presale-header {
        margin-bottom: 15px;
    }
    
    .animated-line {
        display: none;
    }
}

/* Focus durumunda viewport düzeltmesi */
input:focus {
    outline: none;
    border-color: #74d1f2;
    box-shadow: 0 0 0 3px #74d1f21a;
    background: #74d1f20d;
}

/* Touchscreen optimizasyonu */
@media (hover: none) and (pointer: coarse) {
    .payment-method,
    .buy-button,
    .refresh-btn {
        min-height: 44px; /* Apple HIG minimum touch target */
    }
    
    .payment-method:active {
        transform: scale(0.98);
    }
    
    .buy-button:active:not(:disabled) {
        transform: scale(0.98);
    }
}

/* Animasyonlar için prefers-reduced-motion desteği */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Kalan stil tanımlamalarınız aynı kalacak... */
/* (Geri kalan CSS kodları aynen korunacak) */

.presale-form:before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #74d1f2, #ae61cc, #fefefe, #74d1f2, #ae61cc, #fefefe);
    background-size: 300% 300%;
    border-radius: 22px;
    animation: gradientMove 6s ease infinite;
    z-index: -1;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    to {
        background-position: 0% 50%;
    }
}

.animated-line {
    width: 80%;
    height: 2px;
    margin: 15px auto;
    background: linear-gradient(90deg, transparent, #000000, #ffffff, #000000, transparent, #ffffff, #000000, transparent);
    background-size: 200% 100%;
    animation: lineMove 10s ease-in-out infinite;
    border-radius: 1px;
}

@keyframes lineMove {
    0% {
        background-position: -200% 0;
    }
    50% {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

h1 {
    margin: 20px 0;
    color: #000;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: none;
}

.centeum-highlight {
    background: linear-gradient(135deg, #74d1f2, #ae61cc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.centeum-highlight:after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #74d1f2, #ae61cc);
    opacity: .6;
}

.presale-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.header-logo {
    margin-bottom: 15px;
}

.header-logo img {
    border-radius: 50%;
    box-shadow: 0 4px 15px #74d1f24d;
}

.presale-header h2 {
    color: #000;
    font-size: 1.6rem;
    margin-bottom: 8px;
    font-weight: 700;
    text-shadow: none;
}

.presale-header .centeum-highlight {
    font-size: 1.6rem;
}

.presale-header p {
    color: #78747c;
    font-size: .9rem;
    font-weight: 500;
}

.price-info {
    background: linear-gradient(135deg, #74d1f2, #ae61cc);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.price-info:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fefefe, transparent);
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    to {
        left: 100%;
    }
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.price-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 120px;
}

.price-label {
    font-size: .85rem;
    opacity: .8;
    margin-bottom: 4px;
}

.price-value {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.price-change {
    font-size: .8rem;
    font-weight: 500;
}

.price-change.positive {
    color: #4ade80;
}

.price-change.negative {
    color: #f87171;
}

.price-change.neutral {
    color: #d1d5db;
}

.refresh-btn {
    background: #fff3;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: var(--white);
    cursor: pointer;
    transition: all .3s ease;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.refresh-btn:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: #fefefe4d;
    border-radius: 50%;
    transition: all .5s ease;
    transform: translate(-50%, -50%);
}

.refresh-btn:hover:before {
    width: 100%;
    height: 100%;
}

.refresh-btn:hover {
    background: #ffffff4d;
    transform: rotate(180deg);
}

.price-loading {
    text-align: center;
    margin-top: 10px;
    font-size: .9rem;
    padding: 8px;
    border-radius: 8px;
    background: #ffffff1a;
}

.payment-methods {
    margin-bottom: 25px;
    position: relative;
}

.payment-methods h3 {
    color: #000;
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: left;
}

.method-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.payment-method {
    background: #78747c1a;
    border: 2px solid rgba(120, 116, 124, .2);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all .3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    color: #000;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.method-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-content span {
    color: #000;
    font-weight: 700;
}

.payment-method.active .method-content span {
    color: var(--white);
    font-weight: 700;
}

.method-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-icon img {
    border-radius: 50%;
}

.payment-method:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(116, 209, 242, .1), transparent);
    transition: left .8s;
}

.payment-method:hover:before {
    left: 100%;
}

.payment-method:hover {
    background: #74d1f21a;
    transform: translateY(-2px);
    border-color: #74d1f2;
}

.payment-method.active {
    background: linear-gradient(135deg, #74d1f2, #ae61cc);
    border-color: #74d1f2;
    color: var(--white);
    box-shadow: 0 5px 15px #74d1f266;
}

.wallet-section {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.wallet-section appkit-button {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #000;
    font-weight: 500;
    font-size: 1rem;
}

.payment-label {
    color: #000;
    font-weight: 500;
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 90px 15px 15px;
    border: 2px solid rgba(120, 116, 124, .3);
    border-radius: 12px;
    font-size: 1.1rem;
    background: #78747c0d;
    color: #000;
    transition: all .3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #74d1f2;
    box-shadow: 0 0 0 3px #74d1f21a;
    background: #74d1f20d;
}

.input-wrapper input:read-only {
    background: #78747c1a;
    cursor: not-allowed;
    color: #000;
}

.input-suffix {
    position: absolute;
    right: 15px;
    background: linear-gradient(135deg, #74d1f2, #ae61cc);
    color: var(--white);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-suffix img {
    border-radius: 50%;
    width: 24px;
    height: 24px;
}

.usd-value {
    margin-top: 8px;
    color: #000;
    font-size: 1rem;
    text-align: right;
}

.buy-section {
    margin-bottom: 25px;
}

.buy-button {
    width: 100%;
    background: linear-gradient(135deg, #74d1f2, #ae61cc);
    color: var(--white);
    border: none;
    border-radius: 15px;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.buy-button:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(254, 254, 254, .2), transparent);
    transition: left .8s;
}

.buy-button:hover:not(:disabled):before {
    left: 100%;
}

.buy-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px #74d1f266;
}

.buy-button:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    text-align: center;
    margin-top: 15px;
    color: #000;
    font-weight: 500;
    font-size: 1rem;
}

.loading-spinner.hidden {
    display: none;
}

.message {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    text-align: center;
    font-size: 1rem;
    max-width: 100%;
}

.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.presale-stats {
    background: #78747c1a;
    border-radius: 12px;
    padding: 20px;
    display: grid;
    gap: 12px;
    border: 1px solid rgba(120, 116, 124, .2);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(120, 116, 124, .2);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #000;
    font-size: 1rem;
    font-weight: 500;
}

.stat-value {
    color: #000;
    font-weight: 700;
    font-size: 1rem;
}

.connected-wallet {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.wallet-status {
    color: #000;
    font-size: .9rem;
    font-weight: 500;
    background: #28a7451a;
    padding: 5px 10px;
    border-radius: 15px;
    border: 1px solid rgba(40, 167, 69, .3);
}

@media (max-width: 600px) {
    .pages {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .presale-form {
        padding: 20px;
        margin: 0 10px;
    }
    
    .presale-header h2, .presale-header .centeum-highlight {
        font-size: 1.4rem;
    }
    
    .price-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .price-item {
        align-items: center;
        text-align: center;
    }
    
    .method-buttons {
        grid-template-columns: 1fr;
    }
    
    .input-wrapper input {
        font-size: 1rem;
    }
    
    .buy-button {
        font-size: 1.1rem;
    }
}

@media (max-width: 400px) {
    .presale-form {
        padding: 15px;
        margin: 0 5px;
    }
    
    .pages {
        padding: 10px;
    }
}

/* Edge için transparan zorlama */
@supports (-ms-ime-align: auto) {
    html, body, #app, .pages, .presale-container {
        background: transparent !important;
        background-color: transparent !important;
        -ms-background-color: transparent !important;
    }
    
    :root {
        background: transparent !important;
        background-color: transparent !important;
    }
}

/* Opera için transparan zorlama */
@supports ((-webkit-appearance: none) and (not (-ms-ime-align: auto))) {
    html, body, #app, .pages, .presale-container {
        background: transparent !important;
        background-color: transparent !important;
        -webkit-background-color: transparent !important;
    }
    
    :root {
        background: transparent !important;
        background-color: transparent !important;
    }
}

/* Tüm tarayıcılar için ekstra güçlü zorlama */
html[data-theme], 
body[data-theme],
html[style*="background"],
body[style*="background"] {
    background: transparent !important;
    background-color: transparent !important;
}

/* Dark mode override - LIGHT MODE ZORLA */
@media (prefers-color-scheme: dark) {
    html, body {
        background: transparent !important;
        background-color: transparent !important;
        color-scheme: light !important; /* Dark mode'u engelle */
    }
    
    :root {
        background: transparent !important;
        background-color: transparent !important;
        color-scheme: light !important;
    }
}