/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e8b4d0;
    --primary-dark: #d69ab7;
    --secondary-color: #f4e6ed;
    --accent-color: #c79fb6;
    --text-primary: #2d2d2d;
    --text-secondary: #666666;
    --text-light: #888888;
    --background: #ffffff;
    --card-background: #fafafa;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --error-color: #f44336;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

/* Calculator Section */
.calculator {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

/* Unit Toggle */
.unit-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.unit-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.unit-btn:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
}

.unit-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.unit-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Calculator Form */
.calculator-form {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.unit-text {
    color: var(--text-secondary);
    font-weight: normal;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(232, 180, 208, 0.1);
}

.input-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

.input-help {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Buttons */
.btn-calculate {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-calculate:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-reset {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-reset:hover {
    background: var(--secondary-color);
}

/* Results */
.results {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    animation: fadeIn 0.5s ease-in;
}

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

.results-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.results-main {
    text-align: center;
    margin-bottom: 2rem;
}

.result-box {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.result-box.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.result-label {
    display: block;
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-value {
    display: block;
    font-size: 3rem;
    font-weight: 700;
}

.result-description {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Sister Sizes */
.sister-sizes {
    margin: 2rem 0;
}

.sister-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.sister-sizes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.sister-size-item {
    background: white;
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.sister-size-item:hover {
    border-color: var(--primary-color);
    background: var(--secondary-color);
}

.sister-note {
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

/* Conversion Chart */
.conversion-chart {
    margin: 2rem 0;
}

.chart-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.conversion-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 400px;
}

.conversion-table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.conversion-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.conversion-table tr:hover {
    background: var(--secondary-color);
}

.conversion-table tr:last-child td {
    border-bottom: none;
}

/* How to Measure Section */
.how-to-measure {
    margin-bottom: 3rem;
}

.measure-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.measure-step {
    display: flex;
    gap: 1.5rem;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.measure-step:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.step-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Size Guide Section */
.size-guide {
    margin-bottom: 3rem;
}

.guide-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.guide-item {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.guide-item:hover {
    box-shadow: var(--shadow-hover);
}

.guide-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.guide-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* SEO Content Section */
.seo-content {
    background: var(--secondary-color);
    padding: 4rem 0;
    margin-top: 3rem;
}

.seo-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

.seo-text {
    max-width: 900px;
    margin: 0 auto;
}

.seo-text p {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .measure-steps {
        grid-template-columns: 1fr 1fr;
    }
    
    .guide-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .guide-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .unit-toggle,
    .btn-calculate,
    .btn-reset {
        display: none;
    }
    
    .calculator,
    .how-to-measure,
    .size-guide {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus Styles for Better Accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

