* {
    box-sizing: border-box; 
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    margin: 0;
    padding: 0;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 100%);
    color: #e8e3d3;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; 
    width: 100%;
    max-width: 100vw;
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 175, 55, 0.15);
    top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #d4af37;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: #d4af37;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #c9b896;
    padding: 10px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    font-family: 'Georgia', serif;
}

.nav-links a:hover {
    color: #d4af37;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    width: 30px;
    height: 30px;
    position: relative;
    background: none;
    border: none;
    box-shadow: none;
    outline: none;
    -webkit-tap-highlight-color: transparent; 
}

.hamburger:hover,
.hamburger:active,
.hamburger:focus {
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
}

.hamburger-lines {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #d4af37;
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-lines::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #d4af37;
    top: -6px;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger-lines::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #d4af37;
    bottom: -6px;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger.active .hamburger-lines {
    background-color: transparent;
}

.hamburger.active .hamburger-lines::before {
    transform: rotate(45deg);
    top: 0;
}

.hamburger.active .hamburger-lines::after {
    transform: rotate(-45deg);
    bottom: 0;
}

.container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    width: 100%;
    flex-grow: 1;
    align-items: flex-start; 
}

.sidebar {
    flex: 0 0 300px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e8e3d3;        
    padding: 20px;
    border-radius: 8px;
    margin-left: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(212, 175, 55, 0.05);
    align-self: flex-start;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.sidebar h3 {
    margin-top: 0;
    font-size: 18px;
    text-align: center;
    border-bottom: 2px solid rgba(212, 175, 55, 0.4);  
    padding-bottom: 10px;
    color: #d4af37;  
    font-family: 'Georgia', serif;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #c9b896;         
    font-weight: 500;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: rgba(212, 175, 55, 0.15); 
    color: #d4af37;     
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.table-wrapper {
    overflow-x: auto;
}

.calculator-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.1);
}

.measurement-input {
    margin-bottom: 20px;
}

.measurement-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #c9b896;
}

.measurement-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    font-size: 16px;
    background-color: rgba(15, 15, 26, 0.7);
    color: #e8e3d3;
}

.calc-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    color: #f5e6a3;
    border: 1px solid #d4af37;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.calc-btn:hover {
    background: linear-gradient(135deg, #9c27b0 0%, #6a1b9a 100%);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.result-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(15, 15, 26, 0.8);
    border-radius: 4px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: rgba(15, 15, 26, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    color: #e8e3d3;
}

th {
    background-color: rgba(212, 175, 55, 0.15);
    font-weight: bold;
    color: #d4af37;
    font-family: 'Georgia', serif;
}

.calculator-container input {
    padding: 10px;
    width: 100%;
    max-width: 100%; 
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    font-size: 1em;
    color: #e8e3d3;
    background-color: rgba(15, 15, 26, 0.7);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.calculator-container input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.content {
    flex: 1;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(212, 175, 55, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

h1 {
    margin-top: 0;
    font-size: 26px;
    margin-bottom: 20px;
    color: #d4af37;
    font-family: 'Georgia', serif;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    letter-spacing: 1px;
}

#info {
    margin-top: 40px;
}

#info h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #d4af37;
    font-family: 'Georgia', serif;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

#info h3 {
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #c9b896;
    font-family: 'Georgia', serif;
}

#info p {
    font-size: 16px;
    margin-top: 10px;
    margin-bottom: 15px;
    color: #b8b09a;
}

#info ol, #info ul {
    padding-left: 0;
    margin-left: 0;  
    list-style-position: inside; 
}

#info ol li, #info ul li {
    padding-left: 0; 
    margin-left: 0;  
    color: #b8b09a;
}

#info ul li::marker {
    color: #d4af37;
}

.calculator-cards {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.calculator-cards ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.calculator-cards li {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-cards li a {
    display: block;
    padding: 20px;
    color: #c9b896;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    position: relative;
    font-family: 'Georgia', serif;
}

.calculator-cards li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

.conversion-options {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
}

.radio-group {
    position: relative;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-group label {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    background-color: rgba(15, 15, 26, 0.7);
    color: #b8b09a;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(212, 175, 55, 0.3);
    cursor: pointer;
    user-select: none;
    font-family: 'Georgia', serif;
}

.radio-group input[type="radio"]:checked + label {
    background-color: rgba(212, 175, 55, 0.2);
    color: #d4af37;
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.radio-group label:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.6);
}

.radio-group input[type="radio"]:focus + label {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

.radio-group input[type="radio"]:active + label {
    transform: scale(0.98);
}

.radio-group input[type="radio"]:disabled + label {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d4af37;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    position: relative;
    background-color: rgba(15, 15, 26, 0.7);
}

.input-group input[type="checkbox"]:checked {
    background-color: #d4af37;
    border-color: #d4af37;
}

.input-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid #1a1a2e;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.footer {
    text-align: center;
    padding: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer p {
    padding: 3px;
    font-size: 0.8em;
    color: #8a8474;
    font-family: 'Georgia', serif;
}

.footer p a {
    color: #c9b896;
    text-decoration: none;
    padding: 10px; 
    transition: color 0.3s ease;
}

.footer p a:hover {
    color: #d4af37;
}

.result-container {
    background: rgba(15, 15, 26, 0.8);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.product-table th, .product-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.product-table th {
    background-color: rgba(212, 175, 55, 0.15);
    color: #d4af37;
}

.product-table-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    transition: transform 0.2s;
}

.product-table-image:hover {
    transform: scale(1.05);
}

.table-amazon-button {
    display: inline-block;
    padding: 8px 15px;
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    color: #f5e6a3;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #d4af37;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Georgia', serif;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.4);
}

.table-amazon-button:hover {
    background: linear-gradient(135deg, #9c27b0 0%, #6a1b9a 100%);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.product-title {
    color: #c9b896;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2em;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    max-height: 2.8em; 
    margin-bottom: 10px;
    text-overflow: ellipsis;
    font-family: 'Georgia', serif;
}

.product-title:hover {
    color: #d4af37;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.number-cell {
    font-weight: bold;
    color: #d4af37;
    width: 50px;
    font-family: 'Georgia', serif;
}

.image-cell {
    width: 170px;
}

.button-cell {
    width: 150px;
}

.likert-scale {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
    gap: 10px;
}

.likert-option {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(15, 15, 26, 0.7);
    color: #b8b09a;
}

.likert-option:hover {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.5);
}

.likert-option.selected {
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    color: #f5e6a3;
    border-color: #d4af37;
    font-weight: bold;
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

@media (max-width: 768px) {
    .likert-scale {
        flex-direction: column;
        gap: 8px;
    }
    
    .likert-option {
        padding: 10px;
    }
}

.gender-selection {
    margin: 2rem 0;
    text-align: center;
}

.gender-btn {
    padding: 0.8rem 1.6rem;
    margin: 0 0.5rem;
    background: rgba(15, 15, 26, 0.8);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: #c9b896;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
}

.gender-btn:hover {
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    color: #f5e6a3;
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.gender-btn.selected {
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    color: #f5e6a3;
    border-color: #d4af37;
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
}

.quiz-container {
    display: none;
    max-width: 800px;
    margin: 0 auto;
}

.question {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(15, 15, 26, 0.8);
    border-radius: 0.8rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(212, 175, 55, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.question h3 {
    color: #d4af37;
    margin-bottom: 1rem;
    font-family: 'Georgia', serif;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.option {
    padding: 0.8rem 1rem;
    background-color: rgba(212, 175, 55, 0.05);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    color: #c9b896;
}

.option:hover {
    background-color: rgba(212, 175, 55, 0.15);
    transform: translateX(5px);
    border-left-color: rgba(212, 175, 55, 0.5);
}

.option.selected {
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    color: #f5e6a3;
    border-left-color: #d4af37;
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

#result {
    display: none;
    padding: 2rem;
    background: rgba(15, 15, 26, 0.8);
    border-radius: 0.8rem;
    margin-top: 2rem;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(212, 175, 55, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.type-description {
    margin-top: 1.5rem;
    line-height: 1.6;
}

.type-description h3 {
    color: #d4af37;
    margin: 1.2rem 0 0.5rem;
    font-family: 'Georgia', serif;
}

.calc-btn {
    display: block;
    margin: 1.5rem auto;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #7b1fa2 0%, #4a148c 100%);
    color: #f5e6a3;
    border: 1px solid #d4af37;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    width: fit-content;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.calc-btn:hover {
    background: linear-gradient(135deg, #9c27b0 0%, #6a1b9a 100%);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
}

@media (max-width: 768px) {
    .gender-selection {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .gender-btn {
        margin: 0;
        width: 100%;
        padding: 1rem;
    }
    
    .options {
        flex-direction: column;
    }
    
    .option {
        padding: 1rem;
    }
    
    .question {
        padding: 1.2rem;
        margin: 1.2rem 0;
    }
    
    #result {
        padding: 1.5rem;
    }
    
    .calc-btn {
        width: 100%;
        padding: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .options {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); }
}

.question {
    animation: fadeIn 0.4s ease-out;
}

#result {
    animation: fadeIn 0.6s ease-out;
}

.progress-container {
    width: 100%;
    background-color: rgba(212, 175, 55, 0.1);
    border-radius: 0.5rem;
    margin: 1rem 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.progress-bar {
    height: 0.5rem;
    background: linear-gradient(90deg, #7b1fa2 0%, #d4af37 100%);
    border-radius: 0.5rem;
    width: 0%;
    transition: width 0.4s ease, background-color 0.3s ease;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

@media (max-width: 900px) {
    .header {
        margin-bottom: 0;
    }

    .logo {
        font-size: 20px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        right: 0;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        width: 200px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.1);
        padding: 20px;
        border: 1px solid rgba(212, 175, 55, 0.3);
    }

    .nav-links.active {
        display: block;
    }

    .nav-links a {
        display: block;
        padding: 10px;
    }

    .hamburger {
        display: block;
    }
    
    .container {
        flex-direction: column;
        padding: 15px; 
        margin: 0; 
    }

    .sidebar {
        flex: 0 0 auto;
        margin-left: 0;
        margin-top: 20px;
        width: 100%;
        max-width: 100%;
        order: 1;
        padding: 15px; 
    }

    .content {
        order: 0;
        margin-bottom: 20px;
        padding: 20px;
        width: 100%;
        max-width: 100%;
    }

    h1 {
        font-size: 20px; 
        margin-bottom: 15px;
    }

    .sidebar h3 {
        font-size: 16px; 
    }

    #info h2 {
        font-size: 18px;
    }

    #info h3 {
        font-size: 1em;
    }

    label, select, button {
        font-size: 16px; 
    }

    select, button {
        padding: 8px; 
    }

    #result-name {
        font-size: 28px; 
    }

    #common-link h2 {
        font-size: 18px;
    }

    #common-link li {
        flex: 1 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .calculator-cards ul {
        grid-template-columns: 1fr;
    }
    
    .calculator-cards {
        padding: 10px;
    }
    
    .size-option {
        padding: 8px 15px;
        min-width: 70px;
    }

    .primary-size {
        font-size: 2.5em;
    }

    .product-table thead {
        display: none; 
    }

    .product-table, 
    .product-table tbody, 
    .product-table tr, 
    .product-table td {
        display: block;
        width: 100%;
        text-align: center;
    }

    .product-table tr {
        margin-bottom: 30px;
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        background-color: rgba(15, 15, 26, 0.6);
    }

    .product-table td {
        border: none;
        padding: 8px;
    }

    .number-cell {
        font-size: 1.2em;
        color: #d4af37;
        margin-bottom: 10px;
    }

    .image-cell {
        margin: 0 auto;
    }

    .product-table-image {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    .product-title {
        font-size: 1.1em;
        margin: 15px 0;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .button-cell {
        margin-top: 15px;
    }

    .table-amazon-button {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        padding: 12px 20px;
    }

    .number-cell::before {
        content: "#";
    }
}

@media (max-width: 480px) {
    .product-table-image {
        width: 150px;
        height: 150px;
    }

    .product-table tr {
        padding: 10px;
    }

    .product-title {
        font-size: 1em;
        max-width: 250px;
    }
}
