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

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@media (max-width: 768px) {
    body {
        padding: 0;
        background: none;
    }
}

.app-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (max-width: 768px) {
    .app-container {
        max-width: none;
        width: 100vw;
        height: 100vh;
    }
}

.card {
    width: 100%;
    aspect-ratio: 2.5/3.5;
    border-radius: 12px;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

@media (max-width: 768px) {
    .card {
        width: 100vw;
        height: 100vh;
        aspect-ratio: unset;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
}

.card.early-life {
    background-color: #E8B4B8;
}

.card.mid-life {
    background-color: #6B2737;
}

.card.late-life {
    background-color: #4A6670;
}

.card-header {
    padding: 16px 20px 8px;
    text-align: center;
}

.card-type {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.card.early-life .card-type {
    color: rgba(0, 0, 0, 0.7);
}

.card-content {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.question {
    font-size: 18px;
    line-height: 1.4;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card.early-life .question {
    color: #2c3e50;
    text-shadow: none;
}

.card-footer {
    padding: 12px 20px 16px;
    text-align: center;
}

.brand {
    font-size: 14px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

.card.early-life .brand {
    color: rgba(0, 0, 0, 0.6);
}

.card {
    cursor: pointer;
    user-select: none;
}

.settings-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 100;
}

.settings-icon:hover {
    background: rgba(255, 255, 255, 1);
    transform: rotate(90deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.settings-icon svg {
    color: #666;
}

.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-modal.show {
    opacity: 1;
    visibility: visible;
}

.settings-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .settings-content {
        width: 95%;
        max-width: none;
        margin: 20px;
        max-height: calc(100vh - 40px);
        border-radius: 16px;
    }
}

.settings-modal.show .settings-content {
    transform: translateY(0);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
}

.settings-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-button:hover {
    background: #f5f5f5;
    color: #666;
}

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

.setting-group h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.radio-option:hover,
.checkbox-option:hover {
    background: #f8f9fa;
}

.radio-option input,
.checkbox-option input {
    margin-right: 12px;
    transform: scale(1.2);
}

.radio-option span,
.checkbox-option span {
    color: #333;
    font-size: 14px;
}

.apply-settings {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.apply-settings:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .settings-icon {
        background: rgba(0, 0, 0, 0.1);
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    
    .card.early-life .settings-icon {
        background: rgba(0, 0, 0, 0.1);
    }
    
    .card.mid-life .settings-icon,
    .card.late-life .settings-icon {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .settings-icon svg {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .card.early-life .settings-icon svg {
        color: rgba(0, 0, 0, 0.7);
    }
}

@media (max-width: 480px) {
    .question {
        font-size: 16px;
    }
}