* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #000000;
    --bg-secondary: #000000;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-cyan: #00bcd4;
    --accent-green: #4caf50;
    --accent-blue: #2196f3;
    --accent-purple: #9c27b0;
    --accent-indigo: #3f51b5;
    --accent-red: #f44336;
    --border-color: rgba(255, 255, 255, 0.2);
    --card-bg: #000000;
}

html {
    height: 100%;
    width: 100%;
    background: #000000 !important;
    background-color: #000000 !important;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000000 !important;
    background-color: #000000 !important;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    height: auto;
    width: 100%;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Tüm beyaz alanları kapatmak için */
body::before,
body::after {
    display: none;
}

/* iOS Safari için ekstra beyaz alan önleme */
@supports (-webkit-touch-callout: none) {
    html {
        background: #000000 !important;
        background-color: #000000 !important;
        position: relative;
        width: 100%;
        height: auto;
        min-height: 100%;
        overflow-y: auto;
    }

    body {
        background: #000000 !important;
        background-color: #000000 !important;
        position: relative;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 100vh;
    }
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 15px 150px 15px;
    background: #000000;
    min-height: calc(100vh + 200px);
    position: relative;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 15px;
    padding: 20px 0 10px 0;
}

header .title {
    margin: 0;
}

/* Pull-to-refresh ipucu */
.pull-hint {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    padding: 6px 0 2px 0;
    letter-spacing: 0.5px;
    user-select: none;
}

/* Pull-to-refresh göstergesi (mobil) */
.pull-to-refresh-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 0;
    overflow: hidden;
    transition: height 0.2s ease, opacity 0.2s ease;
    opacity: 0;
    color: var(--accent-cyan);
    font-size: 14px;
    font-weight: 500;
}

.pull-to-refresh-indicator.visible {
    opacity: 1;
}

.pull-to-refresh-indicator.refreshing .pull-icon {
    animation: spin 0.8s linear infinite;
}

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

.pull-icon {
    font-size: 22px;
    transition: transform 0.2s ease;
}

.pull-to-refresh-indicator.ready .pull-icon {
    transform: rotate(180deg);
}

.refresh-button-container {
    text-align: center;
    margin-bottom: 20px;
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(0, 188, 212, 0.15);
    border: 1px solid rgba(0, 188, 212, 0.3);
    border-radius: 10px;
    color: var(--accent-cyan);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background: rgba(0, 188, 212, 0.25);
    border-color: var(--accent-cyan);
    transform: scale(1.05);
}

.btn-refresh:active {
    transform: scale(0.95);
}

.btn-refresh .material-icons {
    font-size: 18px;
}

.bottom-actions-section {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(255, 152, 0, 0.3);
}

.cert-download-section {
    margin-top: 30px;
    margin-bottom: 30px;
    padding: 20px;
    text-align: center;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(255, 152, 0, 0.3);
}

.cert-download-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
    white-space: nowrap;
}

.cert-download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}

.cert-download-link:active {
    transform: translateY(0);
}

.cert-download-link .material-icons {
    font-size: 20px;
}

/* Logs Butonu */
.btn-logs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4);
    white-space: nowrap;
}

.btn-logs:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.5);
}

.btn-logs .material-icons {
    font-size: 20px;
}

/* Logs Sayfası Stilleri */
.logs-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.2), rgba(0, 188, 212, 0.1));
    border: 2px solid var(--accent-cyan);
    border-radius: 12px;
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 188, 212, 0.2);
}

.btn-back:hover {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.3), rgba(0, 188, 212, 0.2));
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4);
    transform: translateY(-2px);
}

.btn-back:active {
    transform: translateY(0);
}

/* İstatistikler */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Filtreleme */
.filters-container {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.15);
}

.btn-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--accent-blue), #1976d2);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-reset {
    background: linear-gradient(135deg, #757575, #616161);
}

.btn-reset:hover {
    box-shadow: 0 4px 12px rgba(117, 117, 117, 0.4);
}

.btn-delete-all {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.btn-delete-all:hover {
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
    transform: translateY(-2px);
}

/* Log Listesi */
.logs-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.log-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.log-item:hover {
    border-color: var(--accent-cyan);
    transform: translateX(5px);
}

.log-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.log-item-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.log-item-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.log-item-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.log-item-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.log-item-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.log-item-status.success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.log-item-status.error {
    background: rgba(244, 67, 54, 0.2);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

/* Tek log silme butonu */
.btn-delete-single {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    color: var(--accent-red);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.btn-delete-single:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: var(--accent-red);
    transform: scale(1.05);
}

.btn-delete-single:active {
    transform: scale(0.95);
}

.btn-delete-single .material-icons {
    font-size: 18px;
}

/* Detay Modal */
.modal-large {
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-large .modal-header {
    flex-shrink: 0;
}

.modal-large .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
    -webkit-overflow-scrolling: touch;
}

/* Modal body scrollbar */
.modal-large .modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-large .modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.modal-large .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.modal-large .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.detail-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.detail-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-field:last-child {
    border-bottom: none;
}

.detail-field-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-field-value {
    color: var(--text-primary);
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent-green), #45a049);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-download-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-delete-pdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f44336, #d32f2f);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-delete-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.btn-delete-pdf .material-icons {
    font-size: 18px;
}

.loading-text {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
    font-size: 16px;
}

/* Mobil Responsive - Logs */
@media (max-width: 428px) {
    .logs-button-container {
        bottom: 15px;
        right: 15px;
    }

    .btn-logs {
        padding: 12px 16px;
        font-size: 14px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 24px;
    }

    .filters-container {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .btn-filter {
        width: 100%;
    }

    .log-item {
        padding: 15px;
    }

    .log-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .modal-large {
        max-width: 95%;
        max-height: 95vh;
    }
}

.title {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% auto;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Forms Container */
.forms-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    background: #000000;
    /* Yatay taşmayı önle */
}

/* Form Card */
.form-card {
    background: #000000 !important;
    border: 1px solid #333333;
    border-radius: 20px;
    overflow: hidden;
}

.form-card.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.3);
}

.form-header {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    user-select: none;
    gap: 15px;
}

/* Sticky form header - scroll sırasında form adı üstte kalsın */
.form-card.active .form-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.form-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    flex-shrink: 0;
}

.form-icon .material-icons {
    font-size: 28px;
    color: var(--text-primary);
}

.form-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.expand-icon {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.form-card.active .expand-icon {
    transform: rotate(180deg);
}

/* Form Content - E1: grid-template-rows animasyonu */
.form-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease-out, opacity 0.25s ease;
    opacity: 0;
}

.form-content > * {
    overflow: hidden;
}

.form-card.active .form-content {
    grid-template-rows: 1fr;
    opacity: 1;
}

.form-fields {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    /* Yatay taşmayı önle */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
    /* Flexbox taşmasını önle */
    box-sizing: border-box;
}

.form-group label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.required {
    color: var(--accent-red);
    margin-left: 4px;
}

.form-group input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.2);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

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

.date-group input {
    flex: 1;
    text-align: center;
}

.date-group input:nth-child(3) {
    flex: 1.2;
}

.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
    /* Taşmayı önle */
}

.date-input-wrapper input {
    flex: 1;
    min-width: 0;
    /* Flexbox taşmasını önle */
    max-width: 100%;
    /* Maksimum genişlik */
}

.date-picker-input {
    cursor: pointer;
    user-select: none;
}

/* iPhone native date picker için stil */
.date-picker-input[type="date"] {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.date-picker-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

/* Tarih görüntüleme span'ı (iPhone için) */
.date-display-span {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 50px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 1;
    line-height: 1.5;
}

.date-input-wrapper.date-input-ios {
    position: relative;
}

.date-input-wrapper.date-input-ios:focus-within .date-display-span {
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.2);
}

/* iPhone'da date input için özel stil */
@supports (-webkit-touch-callout: none) {
    .date-picker-input[type="date"] {
        color: transparent;
        background: transparent;
        border: none;
        padding: 14px 16px;
        font-size: 16px;
        font-weight: 500;
        width: 100%;
        box-sizing: border-box;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 2;
        cursor: pointer;
    }

    .date-picker-input[type="date"]:focus {
        outline: none;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    .date-display-span {
        position: relative;
        display: flex;
        align-items: center;
        pointer-events: none;
    }
}


/* Buttons */
.btn-generate {
    background: linear-gradient(135deg, var(--accent-green), #45a049);
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* AI ile Doldur Bölümü - Ana Menü */
.ai-fill-main-section {
    margin-bottom: 20px;
    background: #000000;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

/* AI Cache Status Indicator - Sağ Üst Köşe (textarea içinde) */
.ai-cache-status {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
}

.ai-cache-status .material-icons {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Loading durumu - dönen spinner */
.ai-cache-status.loading {
    background: rgba(0, 188, 212, 0.2);
    border-color: var(--accent-cyan);
    animation: pulse 1.5s ease-in-out infinite;
}

.ai-cache-status.loading .material-icons {
    color: var(--accent-cyan);
    animation: spin 1s linear infinite;
}

/* Hazır durumu - yeşil tik */
.ai-cache-status.ready {
    background: rgba(76, 175, 80, 0.2);
    border-color: var(--accent-green);
}

.ai-cache-status.ready .material-icons {
    color: var(--accent-green);
}

/* Yeni metin durumu - kırmızı çarpı */
.ai-cache-status.changed {
    background: rgba(244, 67, 54, 0.2);
    border-color: var(--accent-red);
}

.ai-cache-status.changed .material-icons {
    color: var(--accent-red);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Son Hasta Geri Getirme Butonu */
.restore-last-section {
    margin-top: 12px;
    margin-bottom: 12px;
}

.btn-restore-last {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 152, 0, 0.08));
    border: 2px solid rgba(255, 152, 0, 0.4);
    border-radius: 12px;
    color: #ffb74d;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-restore-last:hover {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.25), rgba(255, 152, 0, 0.15));
    border-color: rgba(255, 152, 0, 0.6);
    transform: translateY(-1px);
}

.btn-restore-last .material-icons {
    font-size: 22px;
}

.btn-restore-time {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.7;
    font-weight: 400;
}

/* Restore Mode Section */
.restore-mode-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-restore-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.btn-restore-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-restore-back .material-icons {
    font-size: 18px;
}

.restore-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    color: #81c784;
    font-size: 15px;
    font-weight: 500;
}

.restore-info .material-icons {
    font-size: 22px;
    color: #4caf50;
}

/* Form seçim butonları vurgu modu */
.form-selection-btn.highlight-pulse {
    animation: highlightPulse 1.5s ease-in-out 3;
    border-color: rgba(255, 152, 0, 0.6) !important;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.3);
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 152, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
        border-color: rgba(255, 152, 0, 0.8) !important;
    }
}

/* Restore mode label vurgusu */
.form-selection-label.restore-highlight {
    color: #ffb74d !important;
    font-weight: 700 !important;
    font-size: 15px;
}

.btn-ai-fill-main {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 16px;
    padding: 21px 30px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    min-height: 66px;
}

.btn-ai-fill-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #34d399, #10b981);
}

.btn-ai-fill-main:active {
    transform: translateY(0);
}

.btn-ai-fill-main .expand-icon {
    transition: transform 0.3s ease;
}

.ai-fill-main-content {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Form Seçim Bölümü */
.form-selection-section {
    margin: 20px 0;
    background: #000000;
}

.form-selection-label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.form-selection-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    background: #000000;
}

.form-selection-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    position: relative;
    text-align: left;
    /* Mobil optimizasyonları */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.form-selection-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.form-selection-btn:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
}

.form-selection-btn.selected {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196f3;
    color: #64b5f6;
}

.form-selection-btn.selected:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: #42a5f5;
}

.form-selection-btn.selected:active {
    background: rgba(33, 150, 243, 0.35);
}

.form-selection-icon {
    font-size: 20px;
    color: inherit;
}

.form-selection-text {
    flex: 1;
}

.form-selection-check {
    font-size: 20px;
    color: #2196f3;
    margin-left: auto;
}

/* AI ile Doldur Bölümü (Eski - geriye dönük uyumluluk) */
.ai-fill-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.btn-ai-fill {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-ai-fill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-ai-fill:active {
    transform: translateY(0);
}

.ai-fill-content {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.textarea-wrapper {
    position: relative;
    width: 100%;
}

.ai-textarea {
    width: 100%;
    min-height: 120px;
    max-height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    padding-bottom: 70px;
    /* Buton için alan bırak */
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.btn-clipboard-paste {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--accent-blue), #1976d2);
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
    z-index: 10;
    min-width: 180px;
}

.btn-clipboard-paste:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
}

.btn-clipboard-paste:active {
    transform: translateY(0);
}

.btn-clipboard-paste .material-icons {
    font-size: 20px;
}

.ai-textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.2);
}

.ai-textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.btn-ai-send {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-ai-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-ai-send:active {
    transform: translateY(0);
}

.btn-ai-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* AI Buton Loading Spinner */
.btn-ai-send.loading {
    position: relative;
}

.btn-ai-send.loading .btn-ai-icon,
.btn-ai-send.loading .btn-ai-text {
    opacity: 0.7;
}

.btn-ai-send.loading .btn-ai-spinner {
    display: inline-flex !important;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

.btn-ai-spinner {
    font-size: 18px;
    display: none;
}

/* Test butonu stili */
.btn-ai-test {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.btn-ai-test:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
    background: linear-gradient(135deg, #ffa726, #ff9800);
}

.btn-ai-test:active {
    transform: translateY(0);
}

.btn-ai-test .material-icons {
    font-size: 20px;
}

/* Soru işareti placeholder stili */
.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input[placeholder*="?"]::placeholder {
    color: rgba(255, 165, 0, 0.7);
    font-weight: 600;
}

/* AI ile doldurulmuş formlarda boş alanlar için turuncu vurgu */
.form-fields[data-ai-filled="true"] .ai-empty-field {
    background: rgba(255, 165, 0, 0.15) !important;
    border-color: rgba(255, 165, 0, 0.5) !important;
    color: rgba(255, 165, 0, 0.9) !important;
}

.form-fields[data-ai-filled="true"] .ai-empty-field:focus {
    background: rgba(255, 165, 0, 0.2) !important;
    border-color: rgba(255, 165, 0, 0.7) !important;
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.3) !important;
}

.form-fields[data-ai-filled="true"] .ai-empty-field::placeholder {
    color: rgba(255, 165, 0, 0.8) !important;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

.modal-small {
    max-width: 350px;
}

.password-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.password-input:focus {
    outline: none;
    border-color: var(--accent-green);
}

.password-error {
    font-size: 14px;
    text-align: left;
}

/* Logs sayfası giriş butonu - daha kontrastlı */
#passwordModal .btn-action {
    background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.5) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

#passwordModal .btn-action:hover {
    background: linear-gradient(135deg, #66bb6a, #4caf50) !important;
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.7) !important;
    transform: translateY(-2px) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

#passwordModal .btn-action:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.6) !important;
}

/* Şifre modalı geri butonu */
.btn-back-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.2), rgba(0, 188, 212, 0.1));
    border: 2px solid var(--accent-cyan);
    border-radius: 12px;
    color: var(--accent-cyan);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 188, 212, 0.2);
}

.btn-back-modal:hover {
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.3), rgba(0, 188, 212, 0.2));
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-back-modal:active {
    transform: translateY(0);
}

.btn-back-modal .material-icons {
    font-size: 20px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-header h3 {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-green);
}

.close-modal {
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px 20px 20px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.btn-download {
    background: linear-gradient(135deg, var(--accent-blue), #1976d2);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.btn-view {
    background: linear-gradient(135deg, var(--accent-cyan), #00acc1);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.btn-share {
    background: linear-gradient(135deg, var(--accent-purple), #7b1fa2);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-action:active {
    transform: translateY(0);
}

/* Debug Logs Section */
.modal-debug-logs {
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    margin-top: 0;
}

.debug-logs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.debug-logs-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.debug-logs-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-toggle-logs {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-toggle-logs:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-toggle-logs .material-icons {
    font-size: 20px;
}

.debug-logs-content {
    display: none;
    max-height: 400px;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
}

.debug-logs-content::-webkit-scrollbar {
    width: 6px;
}

.debug-logs-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.debug-logs-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.debug-logs-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.debug-logs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.debug-log-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.5;
}

.debug-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.debug-log-timestamp {
    color: var(--accent-cyan);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.debug-log-time {
    color: var(--accent-green);
    font-weight: 500;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.debug-log-step {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.debug-log-message {
    color: var(--text-secondary);
    font-size: 12px;
    word-break: break-word;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    backdrop-filter: blur(10px);
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
}

/* Progress Bar */
.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
    border-radius: 4px;
    transition: width 0.3s ease-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 14px;
    color: var(--text-secondary);
}

#progressPercent {
    font-weight: 600;
    color: var(--accent-cyan);
}

#progressStep {
    font-size: 12px;
    opacity: 0.8;
}

/* Ana Sayfa Progress Bar */
.main-progress-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px auto 30px auto;
    max-width: 400px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.progress-header .material-icons {
    animation: spin 2s linear infinite;
    color: var(--accent-cyan);
}

.main-progress-container .progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}

.main-progress-container .progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
    border-radius: 3px;
    transition: width 0.3s ease-out;
    position: relative;
}

.main-progress-container .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progress-shine 2s ease-in-out infinite;
}

.main-progress-container .progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

#mainProgressPercent {
    font-weight: 600;
    color: var(--accent-cyan);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 24px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.error {
    border-color: var(--accent-red);
    background: rgba(244, 67, 54, 0.2);
}

.toast.success {
    border-color: var(--accent-green);
    background: rgba(76, 175, 80, 0.2);
}

/* Responsive - Desktop */
@media (min-width: 768px) {
    .container {
        padding: 40px 20px;
    }

    .title {
        font-size: 36px;
    }

    .forms-container {
        max-width: 700px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .modal-content {
        max-width: 500px;
    }

    .modal-actions {
        flex-direction: row;
    }

    .btn-action {
        flex: 1;
    }
}

/* iPhone 13 Pro Max specific optimizations */
@media (max-width: 428px) {
    .container {
        padding: 15px 10px;
    }

    .title {
        font-size: 24px;
    }

    .form-header {
        padding: 16px;
    }

    .form-icon {
        width: 45px;
        height: 45px;
    }

    .form-icon .material-icons {
        font-size: 24px;
    }

    .form-header h2 {
        font-size: 16px;
    }

    .form-fields {
        padding: 0 16px 16px 16px;
        gap: 16px;
    }

    .form-group input {
        padding: 12px 14px;
        font-size: 16px;
        /* iOS zoom'u önlemek için minimum 16px */
    }

    .date-input-wrapper {
        overflow: visible;
        /* Butonun görünmesi için */
    }

    .date-input-wrapper input {
        width: 100%;
        box-sizing: border-box;
    }

    .btn-generate {
        padding: 14px 20px;
        font-size: 16px;
    }

    .ai-textarea {
        padding-bottom: 65px;
        /* Mobilde buton için daha az alan */
        min-height: 120px;
    }

    .btn-clipboard-paste {
        bottom: 8px;
        left: 8px;
        padding: 10px 16px;
        font-size: 14px;
        min-width: 160px;
    }

    .btn-clipboard-paste .material-icons {
        font-size: 18px;
    }

    .cert-download-section {
        margin-top: 20px;
        margin-bottom: 20px;
        padding: 15px;
    }

    .cert-download-link {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 14px;
    }

    .bottom-actions-section {
        flex-direction: column;
        padding: 15px;
    }

    .btn-logs {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    background-color: #000000 !important;
}

/* Tüm beyaz alanları kapat - elementlerin arka planını #000000 yap */
.container,
.forms-container,
.form-card,
.ai-fill-main-section,
.form-content,
.form-fields,
.form-selection-section,
.form-selection-buttons,
.ai-fill-section {
    background-color: #000000 !important;
}

body,
html {
    background-color: #000000 !important;
    background: #000000 !important;
}

/* Prevent text selection on buttons */
button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Input focus improvements for mobile */
input:focus {
    font-size: 16px !important;
    /* iOS zoom'u önlemek için */
}

/* Date Wheel Picker Styles */
.date-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.date-picker-modal.show {
    display: flex;
}

.date-picker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.date-picker-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: datePickerFadeIn 0.3s ease;
    z-index: 4001;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

@keyframes datePickerFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.date-picker-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.date-picker-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.date-picker-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.date-picker-close .material-icons {
    font-size: 24px;
}

.date-picker-body {
    position: relative;
    padding: 20px;
    overflow: hidden;
    flex: 1;
    min-height: 300px;
}

.wheel-picker-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    height: 250px;
    min-height: 250px;
    padding: 0 10px;
}

.wheel-picker {
    flex: 1;
    height: 100%;
    min-height: 250px;
    position: relative;
    overflow: visible;
    margin: 0 5px;
    display: flex;
    flex-direction: column;
}

.wheel-picker-items {
    position: relative;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-top: 100px;
    padding-bottom: 100px;
    /* Dokunmatik ekranlar için momentum scrolling */
    -webkit-overflow-scrolling: touch;
    /* Touch action - sadece dikey kaydırma */
    touch-action: pan-y;
    /* Overscroll davranışı */
    overscroll-behavior: contain;
    /* Smooth scrolling için snap */
    scroll-snap-type: y proximity;
    /* Mouse ile sürükleme için */
    cursor: grab;
    /* Scroll edilebilir olduğundan emin ol */
    will-change: scroll-position;
}

.wheel-picker-items::-webkit-scrollbar {
    display: none;
}

.wheel-picker-item {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    user-select: none;
    cursor: inherit;
    font-weight: 400;
    /* Scroll snap için */
    scroll-snap-align: center;
    scroll-snap-stop: always;
    /* Sürüklenebilir olmamalı */
    pointer-events: auto;
}

.wheel-picker-item.selected {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 24px;
    transform: scale(1.1);
}

.wheel-picker-selection-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 50px;
    transform: translateY(-50%);
    border-top: 2px solid var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(to bottom,
            rgba(0, 188, 212, 0.1) 0%,
            transparent 50%,
            transparent 50%,
            rgba(0, 188, 212, 0.1) 100%);
}

.date-picker-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.date-picker-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-picker-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.date-picker-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-secondary);
}

.date-picker-btn-confirm {
    background: linear-gradient(135deg, var(--accent-cyan), #00acc1);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.date-picker-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

/* iPhone optimizasyonları */
@media (max-width: 428px) {
    .date-picker-modal {
        padding: 10px;
    }

    .date-picker-container {
        max-height: 70vh;
        border-radius: 20px;
    }

    .date-picker-body {
        padding: 15px;
        min-height: 280px;
    }

    .wheel-picker-wrapper {
        height: 220px;
        padding: 0 5px;
    }

    .wheel-picker-item {
        height: 44px;
        font-size: 18px;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .wheel-picker-item.selected {
        font-size: 22px;
    }

    .wheel-picker-selection-indicator {
        height: 44px;
    }

    .date-picker-header {
        padding: 16px;
    }

    .date-picker-header h3 {
        font-size: 16px;
    }

    .date-picker-footer {
        padding: 16px;
    }

    .date-picker-btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* iOS PDF Viewer Modal */
.pdf-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

.pdf-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.pdf-viewer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 10px;
}

.pdf-viewer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 10px;
    color: var(--accent-red);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.pdf-viewer-close:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: var(--accent-red);
}

.pdf-viewer-close .material-icons {
    font-size: 24px;
}

.pdf-viewer-content {
    flex: 1;
    display: flex;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.pdf-viewer-object {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.pdf-viewer-iframe {
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: none;
    background: #fff;
}