/**
 * ConvMaster - Hat Size Converter Styles
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    font-weight: 700;
    font-size: 2rem;
}

.tool-header__icon .icon--purple {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   CURRENT DATE BANNER
   ===================================================== */
.current-date-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.current-date-banner__icon {
    font-size: 1.25rem;
}

.current-date-banner__text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   HATS WIDGET
   ===================================================== */
.hats-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* =====================================================
   TOOLBAR
   ===================================================== */
.widget-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    flex-wrap: wrap;
    gap: 1rem;
}

.widget-toolbar__left,
.widget-toolbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.widget-toolbar__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Toolbar Buttons */
.btn-toolbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toolbar:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

.btn-toolbar__icon {
    font-size: 1rem;
}

/* Popup Button */
.btn-popup {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-popup:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

.btn-popup__icon {
    font-size: 1rem;
}

/* =====================================================
   INPUT MODE SECTION
   ===================================================== */
.input-mode-section {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.input-mode-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.input-mode-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    justify-content: center;
}

.input-mode-tab:hover {
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.input-mode-tab.active {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
}

.input-mode-tab__icon {
    font-size: 1.25rem;
}

/* =====================================================
   CONVERSION SECTION
   ===================================================== */
.conversion-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.conversion-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.conversion-row:last-child {
    margin-bottom: 0;
}

.conversion-row--button {
    justify-content: center;
    margin-top: 0.5rem;
}

.conversion-row[hidden] {
    display: none;
}

.conversion-group {
    flex: 1;
    min-width: 160px;
}

.conversion-group--full {
    flex: 1 1 100%;
    max-width: 400px;
    margin: 0 auto;
}

.conversion-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.conversion-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
}

.conversion-group select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* CM Input Wrapper */
.cm-input-wrapper {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.cm-input-wrapper:focus-within {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.cm-input-wrapper input {
    flex: 1;
    min-width: 80px;
    padding: 0.875rem 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    background: transparent;
    border: none;
}

.cm-input-wrapper input:focus {
    outline: none;
}

.cm-input-wrapper .input-unit {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
}

/* Hide number input spinners */
.cm-input-wrapper input[type="number"] {
    -moz-appearance: textfield;
}

.cm-input-wrapper input[type="number"]::-webkit-outer-spin-button,
.cm-input-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cm-input-wrapper input::placeholder {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.size-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    padding: 0;
    background: var(--bg-tertiary);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-secondary);
}

.size-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.size-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

/* Convert Button */
.btn-convert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    white-space: nowrap;
}

.btn-convert:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

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

/* =====================================================
   MESSAGE CONTAINER
   ===================================================== */
.message-container {
    margin: 1rem 1.5rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-container[hidden] {
    display: none;
}

.message-container--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.message-container--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.message-container--info {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
}

/* =====================================================
   RESULTS SECTION
   ===================================================== */
.results-section {
    border-bottom: 1px solid var(--border-color);
}

.results-section[hidden] {
    display: none;
}

.results-header {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.result-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-2px);
}

.result-card--highlight {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
}

.result-card__flag {
    font-size: 1.5rem;
    margin-bottom: 0.375rem;
}

.result-card__system {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.result-card__size {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.result-card__label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

/* =====================================================
   HAT VISUAL SECTION
   ===================================================== */
.hat-visual-section {
    border-bottom: 1px solid var(--border-color);
}

.hat-visual-header {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.hat-visual-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.hat-visual-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hat-diagram {
    max-width: 400px;
    width: 100%;
}

.hat-svg {
    width: 100%;
    height: auto;
}

.hat-svg .measurement-text {
    font-size: 14px;
    font-weight: 600;
    fill: #8b5cf6;
}

/* Head measure image styles */
.head-measure-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.measure-indicator-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

.head-image-container {
    position: relative;
    display: inline-block;
}

.head-measure-img {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: block;
}

.measure-value-box {
    position: absolute;
    top: 28%;
    right: -15px;
    background: var(--bg-card);
    border: 2px solid #8b5cf6;
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #8b5cf6;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.25);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .head-measure-img {
        max-width: 180px;
    }
    
    .measure-value-box {
        right: -5px;
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }
}

.hat-visual-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color--tape {
    background: #d4a574;
}

/* =====================================================
   CHART SECTION
   ===================================================== */
.chart-section {
    border-bottom: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chart-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

.chart-container {
    overflow-x: auto;
    padding: 1rem 1.5rem 1.5rem;
}

.size-chart {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.size-chart th,
.size-chart td {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.size-chart th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    position: sticky;
    top: 0;
}

.size-chart td {
    color: var(--text-secondary);
}

.size-chart tbody tr:hover {
    background: var(--bg-secondary);
}

.size-chart tbody tr.highlight {
    background: rgba(139, 92, 246, 0.1);
}

.size-chart tbody tr.highlight td {
    color: #8b5cf6;
    font-weight: 600;
}

/* =====================================================
   GUIDE SECTION
   ===================================================== */
.guide-section {
    border-bottom: 1px solid var(--border-color);
}

.guide-header {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.guide-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.guide-content {
    padding: 1.5rem;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.guide-step {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.guide-step__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
}

.guide-step__content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.375rem;
}

.guide-step__content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Tips Box */
.tips-box {
    padding: 1rem 1.25rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
}

.tips-box h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f59e0b;
    margin: 0 0 0.75rem;
}

.tips-box ul {
    margin: 0;
    padding-left: 1.25rem;
}

.tips-box li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    line-height: 1.5;
}

.tips-box li:last-child {
    margin-bottom: 0;
}

/* =====================================================
   HAT TYPES SECTION
   ===================================================== */
.hat-types-section {
    border-bottom: 1px solid var(--border-color);
}

.hat-types-header {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.hat-types-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.hat-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.5rem;
}

.hat-type-card {
    text-align: center;
    padding: 1.25rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.hat-type-card:hover {
    border-color: #8b5cf6;
    transform: translateY(-2px);
}

.hat-type-card__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.hat-type-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.375rem;
}

.hat-type-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* =====================================================
   PRIVACY NOTICE
   ===================================================== */
.privacy-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.seo-content {
    margin-top: 2rem;
}

.seo-section {
    margin-bottom: 2.5rem;
}

.seo-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.seo-section > p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--text-tertiary);
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.step-card {
    position: relative;
    padding: 1.25rem;
    padding-left: 3.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.step-card__number {
    position: absolute;
    left: 1rem;
    top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
}

.step-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.375rem;
}

.step-card__text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* FAQ List */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    color: var(--text-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-icon {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.25rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .tool-page {
        padding: 1rem 0.75rem;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-header__text h1 {
        font-size: 1.5rem;
    }
    
    .widget-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .widget-toolbar__left,
    .widget-toolbar__right {
        justify-content: center;
    }
    
    .input-mode-tabs {
        flex-direction: column;
    }
    
    .input-mode-tab {
        min-width: 100%;
    }
    
    .conversion-row {
        flex-direction: column;
    }
    
    .conversion-group,
    .conversion-group--full {
        min-width: 100%;
        max-width: 100%;
    }
    
    .btn-convert {
        width: 100%;
        justify-content: center;
    }
    
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .guide-steps {
        grid-template-columns: 1fr;
    }
    
    .hat-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-card {
        padding: 0.75rem;
    }
    
    .result-card__size {
        font-size: 1.5rem;
    }
    
    .hat-types-grid {
        grid-template-columns: 1fr;
    }
}
