.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.modal-container {
    width: 500px;
    height: 631px;
    background-color: var(--capsule-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.1);
    position: relative;
    background-color: var(--modal-header-bg, rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px 20px 0 0;
}

/* Apple-Style Back Button für Mobile */
.mobile-back-button {
    display: none;
    align-items: center;
    background: none;
    border: none;
    color: var(--aap-accent-color);
    font-size: 17px;
    font-weight: 400;
    cursor: pointer;
    padding: 0;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.mobile-back-button i {
    font-size: 20px;
    margin-right: 6px;
}

.mobile-back-button:hover {
    opacity: 0.7;
}

/* Mobile Vollbild: Header ohne Border-Radius */
@media screen and (max-width: 768px) {
    .modal-header {
        border-radius: 0;
        padding-top: max(16px, env(safe-area-inset-top));
        position: relative;
    }
    
    /* Apple Back Button auf Mobile anzeigen */
    .mobile-back-button {
        display: flex;
    }
    
    /* Modal-Titel zentrieren wenn Back Button vorhanden */
    .modal-header h3 {
        text-align: center;
        flex: 1;
        margin: 0 60px; /* Platz für Back Button und Close Button */
    }
    
    /* Footer-Zurück-Buttons auf Mobile ausblenden */
    .modal-footer .modal-btn-secondary {
        display: none;
    }
    
    /* Wenn nur ein Button im Footer bleibt, volle Breite geben */
    .modal-footer .modal-btn {
        flex: 1;
    }
    
    /* Settings Modal Back-Buttons auf Mobile optimieren */
    .back-button {
        color: var(--aap-accent-color) !important;
        font-size: 17px !important;
        background: none !important;
        border: none !important;
        padding: 8px 0 !important;
    }
    
    .back-button i {
        font-size: 20px;
        margin-right: 6px;
    }
    
    .submenu-header {
        position: relative;
    }
    
    .submenu-header h3 {
        text-align: center;
        margin: 0 60px; /* Platz für Back Button */
    }
}

.modal-header h3 {
    font-size: 20px;
    color: var(--text-color);
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: rgb(29, 29, 31);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    padding: 0;
}

.modal-close img {
    width: 14px;
    height: 14px;
    filter: invert(100%);
    transition: transform 0.2s ease;
}

.modal-close:hover {
    background-color: rgb(44, 44, 46);
}

/* Dark Mode Anpassungen */
:root[data-theme="dark"] .modal-close {
    background-color: rgb(245, 245, 247);
}

:root[data-theme="dark"] .modal-close img {
    filter: none;
}

:root[data-theme="dark"] .modal-close:hover {
    background-color: rgb(223, 223, 227);
}

.modal-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-content h4 {
    font-size: 16px;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 600;
}

.checkbox-group {
    margin-bottom: 24px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--aap-accent-color);
}

.checkbox-item label {
    font-size: 16px;
    color: var(--text-color);
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid rgba(150, 150, 150, 0.1);
    gap: 12px;
    background-color: var(--modal-header-bg, rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 0 0 20px 20px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Mobile Vollbild: Footer ohne Border-Radius */
@media screen and (max-width: 768px) {
    .modal-footer {
        border-radius: 0;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

.modal-btn {
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-primary {
    background-color: var(--aap-accent-color);
    color: white;
    border: none;
}

.modal-btn-primary:hover {
    background-color: #0062cc;
}

.modal-btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid rgba(150, 150, 150, 0.3);
}

.modal-btn-secondary:hover {
    background-color: rgba(150, 150, 150, 0.1);
}

/* Mobile Anpassungen für das Modal - Vollbildmodus */
@media screen and (max-width: 768px) {
    .modal-container {
        width: 100vw;
        height: calc(100vh - 50px);
        margin: 0;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }
    
    .modal-content {
        overflow-y: auto;
        flex: 1;
        max-height: none;
        display: flex;
        flex-direction: column;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
        border-radius: 0;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
    
    .modal-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    /* Setup Modal Bildanpassungen */
    .setup-image img {
        max-width: 250px !important;
        width: 90% !important;
        height: auto !important;
        margin-bottom: 20px !important;
    }
}

/* Apple-Style Setup Modal */
.setup-modal-container {
    position: relative;
    overflow: hidden;
    width: 500px;
    height: 631px;
    display: flex;
    flex-direction: column;
}

.setup-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.setup-screen.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
}

.setup-screen.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
}

.setup-screen.slide-in-right {
    transform: translateX(100%);
    opacity: 0;
}

.setup-content {
    text-align: left;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(80vh - 140px); /* Höhe minus Header und Footer */
}

/* Für das Willkommen-Screen bleibt der Text zentriert */
#welcomeScreen .setup-content {
    text-align: center;
}

.setup-icon {
    margin-bottom: 24px;
    text-align: center;
}

.setup-icon i {
    font-size: 64px;
    color: var(--aap-accent-color);
    margin-bottom: 16px;
}

.setup-content h4 {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--text-color);
    font-weight: 600;
    text-align: left;
}

.setup-content p {
    font-size: 18px;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 32px;
    text-align: left;
}

/* Willkommen-Screen spezifische Überschreibungen */
#welcomeScreen .setup-content h4 {
    text-align: center;
}

#welcomeScreen .setup-content p {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Setup Modal Mobile Anpassungen - Vollbildmodus */
@media screen and (max-width: 768px) {
    .setup-modal-container {
        width: 100vw;
        height: calc(100vh - 50px);
        margin: 0;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }
    
    .modal-content {
        overflow-y: auto;
        flex: 1;
        max-height: none;
        display: flex;
        flex-direction: column;
    }
    
    /* Setup Content im Vollbildmodus optimieren */
    .setup-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 24px !important;
        max-height: none !important;
        overflow-y: auto;
        min-height: 0;
    }
    
    .setup-content > div {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    /* Letzter Paragraph ohne Margin-Bottom */
    .setup-content p:last-of-type {
        margin-bottom: 0 !important;
    }
    
    /* Bessere Text-Abstände für Mobile */
    .setup-content h4 {
        font-size: 26px !important;
        margin-bottom: 20px !important;
    }
    
    .setup-content p {
        font-size: 18px !important;
        line-height: 1.4 !important;
        margin-bottom: 16px !important;
    }
    
    .setup-image {
        margin-bottom: 20px !important;
    }
}

/* Spezielle Anpassungen für größere iPhones (Pro/Pro Max) */
@media screen and (min-width: 430px) and (max-width: 768px) {
    .setup-content h4 {
        font-size: 28px !important;
        margin-bottom: 18px !important;
    }
    
    .setup-content p {
        font-size: 19px !important;
        line-height: 1.4 !important;
        margin-bottom: 14px !important;
    }
    
    .setup-content {
        padding: 28px !important;
    }
    
    .setup-image {
        margin-bottom: 18px !important;
    }
    
    .setup-image img {
        max-width: 280px !important;
        width: 90% !important;
    }
}

/* Sehr kleine Mobile Geräte - bereits durch 768px Breakpoint abgedeckt */
@media screen and (max-width: 480px) {
    /* Zusätzliche Anpassungen für sehr kleine Geräte */
    .modal-content {
        padding: 16px;
    }
    
    /* Setup Content im Vollbildmodus optimieren */
    .setup-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 20px !important;
        max-height: none !important;
    }
    
    .modal-btn {
        padding: 10px 14px;
        font-size: 15px;
    }
    
    /* Kleinere Bilder für sehr kleine Geräte */
    .setup-image img {
        max-width: 200px !important;
        width: 85% !important;
        margin-bottom: 15px !important;
    }
}

/* Landscape Orientation für Mobile - Vollbildmodus */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .modal-container {
        width: 100vw;
        height: calc(100vh - 50px);
        margin: 0;
        border-radius: 0;
    }
    
    .setup-modal-container {
        width: 100vw;
        height: calc(100vh - 50px);
        margin: 0;
        border-radius: 0;
    }
    
    .modal-content {
        overflow-y: auto;
        max-height: calc(100vh - 120px);
    }
    
    /* Kompakte Bilder im Landscape-Modus */
    .setup-image img {
        max-width: 180px !important;
        width: 40% !important;
        margin-bottom: 10px !important;
    }
}

/* Dark mode styles */
[data-theme="dark"] {
    --modal-header-bg: rgba(40, 40, 40, 0.7);
}

.agb-modal {
    background: #fff;
    border-radius: 28px;
    padding: 32px 24px;
    max-width: 700px;
    margin: 40px auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

/* Rename Modal Styles */
.rename-modal-container {
    width: 400px;
    height: auto;
    min-height: 200px;
    max-height: 300px;
}

.rename-content {
    padding: 24px 20px;
}

.rename-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rename-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.rename-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(99, 99, 102, 0.2);
    border-radius: 12px;
    font-size: 16px;
    color: var(--text-color);
    background-color: var(--input-bg, rgba(255, 255, 255, 0.8));
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.rename-input:focus {
    border-color: var(--aap-accent-color, #007AFF);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.rename-input::placeholder {
    color: rgba(99, 99, 102, 0.6);
}

.rename-info {
    margin-top: -8px;
}

.rename-info small {
    color: rgba(99, 99, 102, 0.8);
    font-size: 12px;
}

/* Dark Mode für Rename Modal */
:root[data-theme="dark"] .rename-input {
    background-color: rgba(28, 28, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

:root[data-theme="dark"] .rename-input:focus {
    border-color: #0A84FF;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
}

:root[data-theme="dark"] .rename-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

:root[data-theme="dark"] .rename-info small {
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile Anpassungen für Rename Modal */
@media screen and (max-width: 768px) {
    .rename-modal-container {
        width: 90vw;
        max-width: 400px;
        margin: 0 20px;
    }
    
    .rename-content {
        padding: 20px 16px;
    }
    
    .rename-input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
        padding: 14px 16px;
    }
}

/* Download Options Modal Styles */
.download-options-modal-container {
    width: 480px;
    height: auto;
    min-height: 280px;
    max-height: 400px;
}

.download-options-content {
    padding: 24px 20px;
}

.download-description {
    margin-bottom: 20px;
}

.download-description p {
    font-size: 16px;
    color: var(--text-color);
    margin: 0;
    text-align: center;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid rgba(99, 99, 102, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--input-bg, rgba(255, 255, 255, 0.8));
}

.download-option:hover {
    border-color: var(--aap-accent-color, #007AFF);
    background-color: color-mix(in srgb, var(--aap-accent-color, #007AFF) 5%, transparent);
}

.download-option.selected {
    border-color: var(--aap-accent-color, #007AFF);
    background-color: color-mix(in srgb, var(--aap-accent-color, #007AFF) 10%, transparent);
}

.download-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--aap-accent-color, #007AFF);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.download-option-icon i {
    font-size: 18px;
    color: white;
}

.download-option-info {
    flex: 1;
}

.download-option-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.download-option-subtitle {
    font-size: 14px;
    color: rgba(99, 99, 102, 0.8);
    line-height: 1.3;
}

/* Dark Mode für Download Options Modal */
:root[data-theme="dark"] .download-option {
    background-color: rgba(28, 28, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] .download-option:hover {
    border-color: #0A84FF;
    background-color: color-mix(in srgb, #0A84FF 5%, transparent);
}

:root[data-theme="dark"] .download-option.selected {
    border-color: #0A84FF;
    background-color: color-mix(in srgb, #0A84FF 10%, transparent);
}

:root[data-theme="dark"] .download-option-icon {
    background-color: #0A84FF;
}

:root[data-theme="dark"] .download-option-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile Anpassungen für Download Options Modal */
@media screen and (max-width: 768px) {
    .download-options-modal-container {
        width: 90vw;
        max-width: 480px;
        margin: 0 20px;
    }
    
    .download-options-content {
        padding: 20px 16px;
    }
    
    .download-option {
        padding: 14px;
    }
    
    .download-option-icon {
        width: 36px;
        height: 36px;
        margin-right: 14px;
    }
    
    .download-option-icon i {
        font-size: 16px;
    }
    
    .download-option-title {
        font-size: 15px;
    }
    
    .download-option-subtitle {
        font-size: 13px;
    }
}

/* Encryption Modal Styling */
.encryption-modal-container {
    width: 90%;
    max-width: 550px;
    height: auto;
    max-height: 90vh;
}

.encryption-content {
    padding: 20px;
}

.encryption-description {
    margin-bottom: 24px;
    color: var(--text-color);
    text-align: center;
}

.encryption-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.encryption-method {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid rgba(150, 150, 150, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--capsule-bg);
}

.encryption-method:hover {
    border-color: var(--aap-accent-color);
    background: color-mix(in srgb, var(--aap-accent-color) 5%, transparent);
}

.encryption-method.selected {
    border-color: var(--aap-accent-color);
    background: color-mix(in srgb, var(--aap-accent-color) 10%, transparent);
}

.encryption-method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--aap-accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.encryption-method-icon-img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.encryption-method-info {
    flex: 1;
}

.encryption-method-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.encryption-method-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Password Section */
.password-section {
    margin-top: 20px;
    padding: 20px;
    background: var(--capsule-bg);
    border-radius: 12px;
    border: 1px solid rgba(150, 150, 150, 0.1);
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.password-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.password-input {
    padding: 12px 16px;
    border: 1px solid rgba(150, 150, 150, 0.2);
    border-radius: 8px;
    background: var(--capsule-bg);
    color: var(--text-color);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.password-input:focus {
    outline: none;
    border-color: var(--aap-accent-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--aap-accent-color) 10%, transparent);
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(150, 150, 150, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.strength-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #ff3b30;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-bar.weak::after {
    width: 25%;
    background: #ff3b30;
}

.strength-bar.fair::after {
    width: 50%;
    background: #ff9500;
}

.strength-bar.good::after {
    width: 75%;
    background: #ffcc00;
}

.strength-bar.strong::after {
    width: 100%;
    background: #34c759;
}

.strength-text {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 80px;
}

.password-info {
    margin-top: 8px;
}

.password-info small {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Biometric Section */
.biometric-section {
    margin-top: 20px;
    padding: 20px;
    background: var(--capsule-bg);
    border-radius: 12px;
    border: 1px solid rgba(150, 150, 150, 0.1);
    text-align: center;
}

.biometric-info p {
    margin-bottom: 20px;
    color: var(--text-color);
}

.biometric-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--aap-accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 auto;
}

.biometric-trigger:hover {
    background: color-mix(in srgb, var(--aap-accent-color) 90%, black);
    transform: translateY(-1px);
}

.biometric-trigger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.biometric-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* Mobile Optimierungen für Encryption Modal */
@media screen and (max-width: 768px) {
    .encryption-modal-container {
        width: 95%;
        max-width: none;
        height: auto;
        max-height: 95vh;
    }
    
    .encryption-content {
        padding: 16px;
    }
    
    .encryption-method {
        padding: 12px;
    }
    
    .encryption-method-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .encryption-method-icon-img {
        width: 20px;
        height: 20px;
    }
    
    .password-section, .biometric-section {
        padding: 16px;
    }
    
    .password-input {
        padding: 14px 16px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }
}

/* Confirmation Modal Styling */
.confirmation-modal-container {
    width: 90%;
    max-width: 450px;
    height: auto;
}

.confirmation-content {
    padding: 20px;
    text-align: center;
}

.confirmation-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.confirmation-icon-img {
    width: 64px;
    height: 64px;
    padding: 16px;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.1);
    filter: brightness(0) saturate(100%) invert(18%) sepia(100%) saturate(7426%) hue-rotate(353deg) brightness(93%) contrast(103%);
}

.confirmation-message {
    margin-bottom: 20px;
}

.confirmation-message p {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
}

.modal-btn-danger {
    background: #ff3b30;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.modal-btn-danger:hover {
    background: #d70015;
    transform: translateY(-1px);
}

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

:root[data-theme="dark"] .confirmation-icon-img {
    background: rgba(255, 59, 48, 0.2);
    filter: brightness(0) invert(1);
}

/* Mobile Optimierungen für Confirmation Modal */
@media screen and (max-width: 768px) {
    .confirmation-modal-container {
        width: 100%;
        height: calc(100vh - 50px);
        border-radius: 0;
    }
    
    .confirmation-content {
        padding: 20px;
    }
    
    .confirmation-icon-img {
        width: 64px;
        height: 64px;
    }
    
    .confirmation-message p {
        font-size: 16px;
    }
}

/* What's New Modal Styles */
.whats-new-modal-container {
    width: 520px;
    max-height: 680px;
}

.whats-new-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px 20px 20px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.1);
    position: relative;
}

.whats-new-icon {
    margin-bottom: 16px;
}

.whats-new-app-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whats-new-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.whats-new-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    max-width: 420px;
}

.whats-new-header .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

.whats-new-content {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.whats-new-feature {
    display: flex;
    align-items: flex-start;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.1);
    transition: background-color 0.2s ease;
}

.whats-new-feature:last-child {
    border-bottom: none;
}

.whats-new-feature:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

:root[data-theme="dark"] .whats-new-feature:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--aap-accent-color) 0%, #007AFF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.feature-icon-img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.feature-info {
    flex: 1;
    min-width: 0;
}

.feature-info h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.feature-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.whats-new-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(150, 150, 150, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.whats-new-footer .modal-btn {
    min-width: 120px;
}

.changelog-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--aap-accent-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: opacity 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.changelog-link:hover {
    opacity: 0.7;
    background-color: rgba(0, 122, 255, 0.1);
}

.changelog-link span {
    font-size: 14px;
}

.external-link-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) saturate(100%) invert(36%) sepia(100%) saturate(2449%) hue-rotate(202deg) brightness(102%) contrast(101%);
}

:root[data-theme="dark"] .external-link-icon {
    filter: brightness(0) invert(1);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .whats-new-modal-container {
        width: 100%;
        height: calc(100vh - 50px);
        border-radius: 0;
        max-height: none;
    }
    
    .whats-new-header {
        padding-top: max(24px, calc(env(safe-area-inset-top) + 8px));
        padding-bottom: 20px;
    }
    
    .whats-new-header .modal-close {
        top: max(16px, calc(env(safe-area-inset-top) + 8px));
    }
    
    .whats-new-content {
        max-height: none;
        flex: 1;
    }
    
    .whats-new-feature {
        padding: 18px 20px;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        margin-right: 14px;
    }
    
    .feature-icon-img {
        width: 22px;
        height: 22px;
    }
    
    .feature-info h4 {
        font-size: 16px;
    }
    
    .feature-info p {
        font-size: 14px;
    }
    
    .whats-new-footer {
        padding: 16px 20px;
        padding-bottom: max(16px, calc(env(safe-area-inset-bottom) + 16px));
    }
    
    .whats-new-footer .modal-btn {
        flex: 1;
    }
}

/* Dark Mode Adjustments */
:root[data-theme="dark"] .whats-new-subtitle,
:root[data-theme="dark"] .feature-info p {
    color: rgba(255, 255, 255, 0.7);
}

/* Terms of Service Modal */
.terms-of-service-modal-container {
    max-width: 700px;
    max-height: 85vh;
    width: 90%;
    height: auto;
}

.terms-of-service-content {
    padding: 0;
    overflow: hidden;
}

.terms-scroll-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.terms-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.terms-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.terms-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.terms-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

:root[data-theme="dark"] .terms-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .terms-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

:root[data-theme="dark"] .terms-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.terms-section {
    margin-bottom: 24px;
}

.terms-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    margin-top: 0;
}

.terms-section p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 12px;
}

.terms-section ul {
    margin: 12px 0;
    padding-left: 20px;
}

.terms-section li {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 8px;
}

.terms-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(150, 150, 150, 0.2);
    text-align: center;
}

.terms-footer p {
    font-size: 13px;
    color: var(--text-color-secondary);
    margin: 0;
    line-height: 1.5;
}

.terms-modal-footer {
    padding: 16px 20px;
    background-color: var(--modal-header-bg, rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(150, 150, 150, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.terms-modal-footer .modal-btn {
    min-width: 120px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .terms-of-service-modal-container {
        width: 100%;
        height: calc(100vh - 50px);
        max-width: none;
        max-height: none;
        border-radius: 0;
        margin: 0;
    }

    .terms-scroll-container {
        max-height: calc(100vh - 140px);
        padding: 16px;
    }

    .terms-section h4 {
        font-size: 16px;
    }

    .terms-section p,
    .terms-section li {
        font-size: 14px;
    }

    .terms-modal-footer {
        padding: 12px 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        flex-direction: column;
        gap: 8px;
    }

    .terms-modal-footer .modal-btn {
        width: 100%;
        min-width: auto;
    }
}