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

body {
    font-family: 'Poppins', sans-serif;
    background: #f99010;
    color: #283141;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease, color 0.3s ease;
}

body[data-theme="dark"] {
    background: #283141;
    color: #8f949c;
}

.main-layout {
    width: 1920px;
    height: 1080px;
    position: relative;
    overflow: hidden;
    transform-origin: top left;
    transform: scale(min(1, 100vw / 1920, 100vh / 1080));
    margin: auto;
}

.theme-toggle-btn {
    position: absolute;
    top: 15px; 
    right: 15px; 
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 37.5px; 
    height: 37.5px; 
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.125rem; 
    padding: 0;
    box-shadow: 0 1.5px 3.75px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

body[data-theme="dark"] .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.5);
}

.kinkxknow-logo {
    position: absolute;
    width: 610.5px; 
    height: 336px; 
    top: 75px; 
    left: 75px; 
    z-index: 2;
}

.lips-image {
    position: absolute;
    width: 439.5px; 
    height: 297px; 
    top: 40%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    z-index: 1;
}

.heels-image {
    position: absolute;
    width: 253.5px; 
    height: 393px; 
    top: 0px;
    right: 0px;
    z-index: 1;
}

.hand-image {
    position: absolute;
    width: 399px; 
    height: 310.5px; 
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.hug-image {
    position: absolute;
    width: 389.25px;
    height: 384px; 
    bottom: 0px;
    right: 96.75px; 
    z-index: 1;
}

.button-group {
    position: absolute;
    top: 600px; 
    left: 90px; 
    display: flex;
    flex-direction: column;
    gap: 22.5px; 
    z-index: 3;
}

.btn-image-style {
    background: #1f00af;
    color: white;
    border: none;
    width: 377.25px; 
    height: 102.75px; 
    padding: 0;
    border-radius: 6px; 
    font-size: 18px; 
    line-height: 102.75px; 
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    font-weight: 600;
    box-shadow: 2.25px 2.25px 6px rgba(0, 0, 0, 0.3); 
    white-space: nowrap;
}

.btn-image-style:hover {
    background: #1A00B3;
    transform: translateY(-2.25px); 
    box-shadow: 3.75px 3.75px 9px rgba(0, 0, 0, 0.4); 
}

.btn {
    background: #000000;
    color: white;
    border: none;
    padding: 9px 18px; 
    border-radius: 6px; 
    font-size: 0.75rem; 
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: #000000;
    transform: translateY(-1.5px);
}

.btn-primary {
    background: #ff3f2c;
}

.btn-primary:hover {
    background: #ff1100;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem; 
    border-radius: 9px; 
    max-width: 90%;
    width: 450px; 
    position: relative;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
    animation: slideIn 0.3s ease;
}

body[data-theme="dark"] .modal-content {
    background: rgba(42, 60, 95, 0.95);
}

.close-btn {
    position: absolute;
    top: 7.5px; 
    right: 11.25px; 
    background: none;
    border: none;
    font-size: 1.125rem; 
    color: #FF6F61;
    cursor: pointer;
}

.close-btn:hover {
    color: #E55A50;
}

.progress-bar {
    height: 6px; 
    background: #DDE4EE;
    border-radius: 3px; 
    margin: 0.75rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2EC4B6;
    width: 0;
    transition: width 0.3s ease;
}

body[data-theme="dark"] .progress-bar {
    background: #3B4D7A;
}

body[data-theme="dark"] .progress-fill {
    background: #1A8C7F;
}

.quiz-content {
    margin: 1.125rem 0; 
}

.quiz-content h2 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem; 
    color: #FF6F61;
}

.quiz-content p {
    margin-bottom: 0.75rem; 
}

.trait-slider {
    width: 100%;
    max-width: 300px; 
    margin: 0.75rem auto;
    -webkit-appearance: none;
    height: 7.5px; 
    background: #DDE4EE;
    border-radius: 3.75px; 
    outline: none;
}

.trait-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px; 
    height: 15px; 
    background: #FF6F61;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.trait-slider::-webkit-slider-thumb:hover {
    background: #E55A50;
}

body[data-theme="dark"] .trait-slider {
    background: #3B4D7A;
}

.slider-label {
    font-size: 0.675rem; 
    color: #2A3C5F;
    margin-top: 0.375rem;
}

body[data-theme="dark"] .slider-label {
    color: #DDE4EE;
}

.feedback {
    font-size: 0.675rem; 
    color: #FF6F61;
    margin-top: 0.75rem; 
    animation: bounce 0.5s ease;
}

.result-section {
    text-align: left;
}

.result-section h3 {
    color: #2EC4B6;
    margin: 0.75rem 0 0.375rem; 
}

.result-section ul {
    list-style: disc;
    padding-left: 1.125rem; 
}

.dashboard {
    margin-top: 1.125rem; 
    padding: 0.75rem; 
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px; 
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); 
    animation: slideIn 0.3s ease;
}

body[data-theme="dark"] .dashboard {
    background: rgba(30, 42, 68, 0.9);
}

.dashboard-item {
    display: flex;
    align-items: center;
    gap: 0.75rem; 
    margin: 0.375rem 0; 
}

.dashboard-item span {
    flex: 1;
    text-align: left;
    font-weight: 600;
}

.score-bar {
    flex: 2;
    height: 9px; 
    background: #DDE4EE;
    border-radius: 4.5px; 
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: #2EC4B6;
    transition: width 0.5s ease;
}

body[data-theme="dark"] .score-bar {
    background: #3B4D7A;
}

body[data-theme="dark"] .score-bar-fill {
    background: #1A8C7F;
}

.score-value {
    flex: 0.5;
    text-align: right;
}

.trait-breakdown {
    margin-top: 0.75rem; 
    padding: 0.75rem; 
    background: rgba(255, 255, 255, 0.8);
    border-radius: 6px; 
    animation: slideIn 0.3s ease;
}

body[data-theme="dark"] .trait-breakdown {
    background: rgba(30, 42, 68, 0.8);
}

.trait-item {
    display: flex;
    align-items: center;
    gap: 0.75rem; 
    margin: 0.375rem 0; 
}

.trait-item span {
    flex: 1;
    text-align: left;
}

.trait-bar {
    flex: 2;
    height: 6px; 
    background: #DDE4EE;
    border-radius: 3px; 
    overflow: hidden;
}

.trait-bar-fill {
    height: 100%;
    background: #FF6F61;
    transition: width 0.5s ease;
}

body[data-theme="dark"] .trait-bar {
    background: #3B4D7A;
}

body[data-theme="dark"] .trait-bar-fill {
    background: #E55A50;
}

.trait-value {
    flex: 0.5;
    text-align: right;
}

.history-content {
    margin: 1.125rem 0; 
    max-height: 225px; 
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem; 
    margin: 0.375rem 0; 
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4.5px; 
    transition: background 0.2s ease;
}

body[data-theme="dark"] .history-item {
    background: rgba(42, 60, 95, 0.7);
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .history-item:hover {
    background: rgba(42, 60, 95, 0.9);
}

.history-item span {
    flex: 1;
}

.history-item button {
    margin-left: 0.375rem; 
}

.styles-filter {
    margin: 0.75rem 0; 
    display: flex;
    align-items: center;
    gap: 0.75rem; 
}

.styles-filter label {
    font-weight: 600;
}

#role-filter {
    padding: 6px; /* 8 * 0.75 */
    border-radius: 4.5px; /* 6 * 0.75 */
    border: 0.75px solid #DDE4EE; /* 1 * 0.75 */
    background: #FFFFFF;
    color: #2A3C5F;
    font-size: 0.75rem; /* 1 * 0.75 */
    cursor: pointer;
}

body[data-theme="dark"] #role-filter {
    border: 0.75px solid #3B4D7A; /* 1 * 0.75 */
    background: #2A3C5F;
    color: #DDE4EE;
}

.styles-content {
    margin: 1.125rem 0; /* 1.5 * 0.75 */
    max-height: 300px; /* 400 * 0.75 */
    overflow-y: auto;
}

.style-card {
    padding: 0.75rem; 
    margin: 0.375rem 0; 
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px; 
    transition: transform 0.2s ease, background 0.2s ease;
}

body[data-theme="dark"] .style-card {
    background: rgba(42, 60, 95, 0.7);
}

.style-card:hover {
    transform: translateY(-3.75px); ]
    background: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .style-card:hover {
    background: rgba(42, 60, 95, 0.9);
}

.style-card h3 {
    color: #FF6F61;
    margin-bottom: 0.375rem;
}

.style-card p {
    margin: 0.375rem 0; 
}

.style-card ul {
    list-style: disc;
    padding-left: 1.125rem; 
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px); 
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@media (max-width: 1920px) {
    body {
        overflow: auto;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .main-layout {
        width: 100vw;
        height: 100vh;
        transform: none;
        display: block;
    }

    .kinkxknow-logo {
        width: calc(610.5 / 1920 * 100vw);
        height: auto;
        top: calc(75 / 1080 * 100vh);
        left: calc(75 / 1920 * 100vw);
    }

    .lips-image {
        width: calc(439.5 / 1920 * 100vw);
        height: auto;
        top: 40%; 
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .heels-image {
        width: calc(253.5 / 1920 * 100vw);
        height: auto;
        top: calc(0 / 1080 * 100vh);
        right: calc(0 / 1920 * 100vw);
    }

    .hand-image {
        width: calc(399 / 1920 * 100vw);
        height: auto;
        bottom: calc(0 / 1080 * 100vh);
        left: 50%;
        transform: translateX(-50%);
    }

    .hug-image {
        width: calc(389.25 / 1920 * 100vw);
        height: auto;
        bottom: calc(0 / 1080 * 100vh);
        right: calc(96.75 / 1920 * 100vw);
    }

    .button-group {
        top: calc(600 / 1080 * 100vh); 
        left: calc(90 / 1920 * 100vw);
        gap: calc(22.5 / 1080 * 100vh);
    }

    .btn-image-style {
        width: calc(377.25 / 1920 * 100vw);
        height: auto;
        padding: calc(102.75 / 2 / 1080 * 100vh) calc(15 / 1920 * 100vw);
        font-size: calc(18 / 1920 * 100vw);
        line-height: 1.2;
    }

    .theme-toggle-btn {
        width: calc(37.5 / 1920 * 100vw);
        height: calc(37.5 / 1080 * 100vh);
        font-size: calc(18 / 1920 * 100vw);
    }
}

@media (max-width: 480px) {
    .main-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 20px;
        height: auto;
        overflow-y: auto;
    }

    .kinkxknow-logo,
    .lips-image,
    .heels-image,
    .hand-image,
    .hug-image,
    .button-group {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none;
        margin: 0 auto;
    }

    .theme-toggle-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .kinkxknow-logo {
        width: 80%;
        height: auto;
        margin-top: 20px;
    }

    .lips-image {
        width: 70%;
        height: auto;
        margin-top: 30px;
    }

    .heels-image {
        display: none;
    }

    .hand-image {
        width: 60%;
        height: auto;
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .hug-image {
        display: none;
    }

    .button-group {
        width: 90%;
        margin-top: 20px;
        margin-bottom: 50px;
        gap: 15px;
    }

    .btn-image-style {
        width: 100%;
        height: auto;
        padding: 15px 10px;
        font-size: 1.1rem;
        line-height: normal;
    }
    
    .modal-content {
        width: 95%;
        padding: 1rem;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .history-item, .style-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .history-item button {
        margin-left: 0;
    }

    .styles-filter {
        flex-direction: column;
        align-items: flex-start;
    }
}
}
