/* Chinese Numerology Calculator Styles */

/* Calculator Card */
.chinese-card {
    max-width: 700px;
    margin: 0 auto;
    overflow: hidden;
}

.calculator-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    text-align: center;
}

.calculator-intro {
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Date Input Layout */
.date-input-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.date-input-group select {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b8b9e' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    min-width: 100px;
}

.date-input-group select:hover {
    border-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.date-input-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.date-input-group select option {
    background: #1a1a2e;
    color: var(--color-text-primary);
    padding: 0.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    text-align: center;
}

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

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

/* Lo Shu Grid */
.loshu-section {
    margin-bottom: 2rem;
}

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

.loshu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-width: 280px;
    margin: 0 auto 1.5rem;
}

.loshu-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    font-family: var(--font-primary);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.loshu-cell.present {
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.loshu-cell.missing {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.25);
}

.loshu-cell.repeated {
    background: rgba(251, 205, 108, 0.15);
    border: 2px solid rgba(251, 205, 108, 0.4);
    color: #FBCD6C;
}

.loshu-cell:hover {
    transform: scale(1.05);
}

.cell-number {
    line-height: 1;
}

.cell-count {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
    opacity: 0.8;
}

/* Cell Tooltip */
.cell-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 35, 0.95);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
    text-align: left;
}

.cell-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-border);
}

.loshu-cell:hover .cell-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Grid Legend */
.loshu-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-dot.present {
    background: rgba(16, 185, 129, 0.5);
    border: 2px solid #10b981;
}

.legend-dot.missing {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.legend-dot.repeated {
    background: rgba(251, 205, 108, 0.5);
    border: 2px solid #FBCD6C;
}

/* Number Summary Cards */
.numbers-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.summary-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.summary-card.driver {
    border-color: rgba(59, 130, 246, 0.3);
}

.summary-card.conductor {
    border-color: rgba(139, 92, 246, 0.3);
}

.summary-card.lucky {
    border-color: rgba(251, 205, 108, 0.3);
}

.summary-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.summary-number {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.summary-card.driver .summary-number {
    color: #3b82f6;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.summary-card.conductor .summary-number {
    color: #8b5cf6;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.summary-card.lucky .summary-number {
    color: #FBCD6C;
    text-shadow: 0 0 20px rgba(251, 205, 108, 0.4);
}

.summary-title {
    font-size: 0.9rem;
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.summary-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* Missing/Repeated Numbers Sections */
.analysis-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.analysis-box.missing {
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.analysis-box.repeated {
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.analysis-box-title {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-box.missing .analysis-box-title {
    color: #f59e0b;
}

.analysis-box.repeated .analysis-box-title {
    color: #10b981;
}

.missing-number-item,
.repeated-number-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.missing-number-item:last-child,
.repeated-number-item:last-child {
    margin-bottom: 0;
}

.missing-number-header,
.repeated-number-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.missing-num,
.repeated-num {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 900;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.missing-num {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.repeated-num {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.repeated-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #FBCD6C;
}

.missing-name,
.repeated-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

.missing-meaning,
.repeated-meaning {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.missing-remedy {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.5rem 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.no-missing,
.no-repeated,
.no-patterns {
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Planes & Arrows Section */
.patterns-section {
    margin: 2rem 0;
}

.patterns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.patterns-column {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.patterns-column-title {
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.planes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    max-width: 150px;
    margin: 0 auto 1rem;
}

.planes-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}

.planes-cell.present {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.planes-cell.missing {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.2);
}

.planes-cell.repeated {
    background: rgba(251, 205, 108, 0.15);
    color: #FBCD6C;
}

.planes-cell.highlighted.highlight-positive {
    box-shadow: 0 0 0 2px #10b981;
}

.planes-cell.highlighted.highlight-negative {
    box-shadow: 0 0 0 2px #f59e0b;
}

/* Pattern Items */
.plane-item,
.arrow-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.plane-item:last-child,
.arrow-item:last-child {
    margin-bottom: 0;
}

.pattern-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.pattern-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

.pattern-numbers {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.pattern-type {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    margin-left: auto;
}

.pattern-type.present,
.pattern-type.positive {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.pattern-type.missing,
.pattern-type.negative {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.pattern-meaning {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.pattern-chars {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.5rem 0 0;
    font-style: italic;
}

.pattern-remedy {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.5rem 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

/* Calculation Breakdown */
.breakdown-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.breakdown-title {
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.breakdown-step {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.breakdown-step:last-child {
    border-bottom: none;
}

.step-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.step-value {
    color: var(--color-text-primary);
    font-weight: 500;
    font-family: monospace;
}

/* Number Cards Grid */
.number-cards-section {
    padding: 4rem 0;
}

.number-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.number-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.number-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.number-card-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.card-number {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 900;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.number-card-body {
    padding: 1.25rem;
}

.card-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-detail:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.detail-value {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    text-align: right;
}

.card-qualities {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.card-qualities .detail-label {
    display: block;
    margin-bottom: 0.25rem;
}

.card-qualities .detail-value {
    text-align: left;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Chinese-style colors for each number card */
.number-card[data-number="1"] .card-number {
    background: rgba(199, 210, 254, 0.1);
    border-color: rgba(199, 210, 254, 0.3);
    color: #C7D2FE;
    text-shadow: 0 0 20px rgba(199, 210, 254, 0.6), 0 0 40px rgba(199, 210, 254, 0.3);
}
.number-card[data-number="1"]:hover { border-color: rgba(199, 210, 254, 0.5); }

.number-card[data-number="2"] .card-number {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
    color: #4ADE80;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.6), 0 0 40px rgba(74, 222, 128, 0.3);
}
.number-card[data-number="2"]:hover { border-color: rgba(74, 222, 128, 0.5); }

.number-card[data-number="3"] .card-number {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #FBBF24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.6), 0 0 40px rgba(251, 191, 36, 0.3);
}
.number-card[data-number="3"]:hover { border-color: rgba(251, 191, 36, 0.5); }

.number-card[data-number="4"] .card-number {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.3);
    color: #A78BFA;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.6), 0 0 40px rgba(167, 139, 250, 0.3);
}
.number-card[data-number="4"]:hover { border-color: rgba(167, 139, 250, 0.5); }

.number-card[data-number="5"] .card-number {
    background: rgba(252, 211, 77, 0.1);
    border-color: rgba(252, 211, 77, 0.3);
    color: #FCD34D;
    text-shadow: 0 0 20px rgba(252, 211, 77, 0.6), 0 0 40px rgba(252, 211, 77, 0.3);
}
.number-card[data-number="5"]:hover { border-color: rgba(252, 211, 77, 0.5); }

.number-card[data-number="6"] .card-number {
    background: rgba(251, 113, 133, 0.1);
    border-color: rgba(251, 113, 133, 0.3);
    color: #FB7185;
    text-shadow: 0 0 20px rgba(251, 113, 133, 0.6), 0 0 40px rgba(251, 113, 133, 0.3);
}
.number-card[data-number="6"]:hover { border-color: rgba(251, 113, 133, 0.5); }

.number-card[data-number="7"] .card-number {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.3);
    color: #22D3EE;
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.6), 0 0 40px rgba(34, 211, 238, 0.3);
}
.number-card[data-number="7"]:hover { border-color: rgba(34, 211, 238, 0.5); }

.number-card[data-number="8"] .card-number {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: #F87171;
    text-shadow: 0 0 20px rgba(248, 113, 113, 0.6), 0 0 40px rgba(248, 113, 113, 0.3);
}
.number-card[data-number="8"]:hover { border-color: rgba(248, 113, 113, 0.5); }

.number-card[data-number="9"] .card-number {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.3);
}
.number-card[data-number="9"]:hover { border-color: rgba(255, 215, 0, 0.5); }

/* Lucky/Unlucky Numbers Section */
.lucky-unlucky-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.lucky-unlucky-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.lucky-column,
.unlucky-column {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
}

.lucky-column {
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.unlucky-column {
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.column-title {
    font-family: var(--font-primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lucky-column .column-title {
    color: #10b981;
}

.unlucky-column .column-title {
    color: #ef4444;
}

.lucky-number-item,
.unlucky-number-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.lucky-number-item:last-child,
.unlucky-number-item:last-child {
    margin-bottom: 0;
}

.lucky-header,
.unlucky-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.lucky-num {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 900;
    color: #10b981;
}

.unlucky-num {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 900;
    color: #ef4444;
}

.lucky-char,
.unlucky-char {
    font-size: 1.25rem;
    color: var(--color-text-muted);
}

.lucky-meaning,
.unlucky-meaning {
    font-weight: 600;
    color: var(--color-text-primary);
}

.lucky-desc,
.unlucky-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0.5rem 0;
}

.lucky-examples,
.unlucky-avoid {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* Popular Number Combinations */
.combinations-box {
    margin-top: 3rem;
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.05) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 16px;
    padding: 2rem;
}

.combinations-box .subsection-title {
    text-align: center;
    color: #F87171;
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px rgba(248, 113, 113, 0.3);
}

.combinations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.combo-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.combo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F87171, #FFD700);
}

.combo-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(248, 113, 113, 0.15);
}

.combo-item.lucky {
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.combo-item.lucky::before {
    background: linear-gradient(90deg, #10b981, #4ADE80);
}

.combo-numbers {
    display: block;
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.combo-item.lucky .combo-numbers {
    color: #4ADE80;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.5), 0 0 40px rgba(74, 222, 128, 0.3);
}

.combo-meaning {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-style: italic;
}

@media (max-width: 768px) {
    .combinations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .combinations-grid {
        grid-template-columns: 1fr;
    }

    .combo-numbers {
        font-size: 1.75rem;
    }
}

/* Comparison Table */
.comparison-section {
    padding: 4rem 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    font-weight: 600;
}

.comparison-table td {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

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

.comparison-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* How It Works Section */
.how-it-works-section {
    padding: 4rem 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.step-number {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 900;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(248, 113, 113, 0.1);
    border: 2px solid rgba(248, 113, 113, 0.3);
    color: #F87171;
    text-shadow: 0 0 20px rgba(248, 113, 113, 0.5), 0 0 40px rgba(248, 113, 113, 0.3);
    position: relative;
}

.step-card:nth-child(1) .step-number {
    background: rgba(199, 210, 254, 0.1);
    border-color: rgba(199, 210, 254, 0.3);
    color: #C7D2FE;
    text-shadow: 0 0 20px rgba(199, 210, 254, 0.5), 0 0 40px rgba(199, 210, 254, 0.3);
}

.step-card:nth-child(2) .step-number {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.3);
    color: #4ADE80;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.5), 0 0 40px rgba(74, 222, 128, 0.3);
}

.step-card:nth-child(3) .step-number {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #FBBF24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5), 0 0 40px rgba(251, 191, 36, 0.3);
}

.step-card:nth-child(4) .step-number {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.3);
    color: #F87171;
    text-shadow: 0 0 20px rgba(248, 113, 113, 0.5), 0 0 40px rgba(248, 113, 113, 0.3);
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Example Calculation Box */
.example-box {
    margin-top: 3rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(248, 113, 113, 0.05) 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 16px;
    padding: 2rem;
}

.example-box .subsection-title {
    color: #FBBF24;
    font-family: var(--font-primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.example-box p {
    margin: 0.75rem 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.example-box p:first-of-type {
    margin-top: 0;
}

.example-box strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

/* Applications Section */
.applications-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.application-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.application-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.application-title {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.application-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Related Calculators */
.related-section {
    padding: 4rem 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.related-card {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
}

.related-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.related-card h3 {
    color: var(--color-text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.related-card p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Calculate Again Button */
.btn-calculate-again {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 2rem auto 0;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-calculate-again:hover {
    background: var(--color-primary);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .date-input-group {
        flex-direction: column;
        align-items: center;
    }

    .date-input-group select {
        width: 100%;
        max-width: 300px;
    }

    .numbers-summary {
        grid-template-columns: 1fr;
    }

    .patterns-grid {
        grid-template-columns: 1fr;
    }

    .lucky-unlucky-grid {
        grid-template-columns: 1fr;
    }

    .loshu-legend {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .loshu-grid {
        max-width: 220px;
    }

    .loshu-cell {
        font-size: 1.5rem;
    }

    .summary-number {
        font-size: 2rem;
    }

    .number-cards-grid {
        grid-template-columns: 1fr;
    }
}
