/* ====================================
   풍수 운세 지도 스타일
   메인 색상: #DEB564 (골드)
==================================== */

/* CSS Variables */
:root {
    --feng-gold: #DEB564;
    --feng-gold-dark: #8B6914;
    --feng-excellent: #27ae60;
    --feng-good: #3498db;
    --feng-neutral: #95a5a6;
    --feng-caution: #e74c3c;
    --feng-gradient: linear-gradient(135deg, #8B6914 0%, #6B5210 100%);
}

/* Header */
.fengshui-header {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(135deg, rgba(222, 181, 100, 0.15) 0%, rgba(139, 105, 20, 0.15) 100%);
    border-radius: 30px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.fengshui-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.8; }
}

.header-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: compass-spin 10s linear infinite;
}

@keyframes compass-spin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

.fengshui-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--feng-gold-dark), var(--feng-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    position: relative;
}

.fengshui-subtitle {
    color: #666;
    font-size: 1.1rem;
    position: relative;
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

/* Space Selection */
.space-selection {
    background: white;
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.space-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.space-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    border: 3px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.space-btn:hover {
    transform: translateY(-5px);
    border-color: rgba(222, 181, 100, 0.5);
    box-shadow: 0 10px 30px rgba(222, 181, 100, 0.2);
}

.space-btn.active {
    background: linear-gradient(135deg, rgba(222, 181, 100, 0.2) 0%, rgba(139, 105, 20, 0.1) 100%);
    border-color: var(--feng-gold);
    box-shadow: 0 10px 30px rgba(222, 181, 100, 0.3);
}

.space-icon {
    font-size: 2.5rem;
}

.space-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* Compass Section */
.compass-section {
    background: white;
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.compass-subtitle {
    text-align: center;
    color: var(--feng-gold-dark);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.compass-container {
    max-width: 450px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
}

/* Compass Grid */
.compass-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

.compass-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #f8f9fa;
    border: 3px solid transparent;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.compass-cell:hover {
    transform: scale(1.05);
    z-index: 10;
}

.compass-cell.excellent {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.15) 0%, rgba(39, 174, 96, 0.05) 100%);
    border-color: var(--feng-excellent);
}

.compass-cell.good {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(52, 152, 219, 0.05) 100%);
    border-color: var(--feng-good);
}

.compass-cell.neutral {
    background: linear-gradient(135deg, rgba(149, 165, 166, 0.15) 0%, rgba(149, 165, 166, 0.05) 100%);
    border-color: var(--feng-neutral);
}

.compass-cell.caution {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15) 0%, rgba(231, 76, 60, 0.05) 100%);
    border-color: var(--feng-caution);
}

.direction-icon {
    font-size: 1.8rem;
}

.direction-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
}

.direction-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    position: absolute;
    bottom: 8px;
}

.compass-cell.excellent .direction-status {
    background: var(--feng-excellent);
    color: white;
}

.compass-cell.good .direction-status {
    background: var(--feng-good);
    color: white;
}

.compass-cell.neutral .direction-status {
    background: var(--feng-neutral);
    color: white;
}

.compass-cell.caution .direction-status {
    background: var(--feng-caution);
    color: white;
}

/* Center Cell - Compass Needle */
.compass-cell.center {
    background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
    border-color: var(--feng-gold);
    cursor: default;
}

.compass-cell.center:hover {
    transform: none;
}

.compass-cell.center .direction-name {
    color: white;
    font-size: 0.8rem;
}

.compass-needle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.needle-n {
    font-size: 1rem;
    font-weight: 800;
    color: #e74c3c;
}

.needle-body {
    width: 8px;
    height: 40px;
    background: linear-gradient(to bottom, #e74c3c 50%, white 50%);
    border-radius: 4px;
    position: relative;
}

.needle-body::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--feng-gold);
    border-radius: 50%;
}

.needle-s {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

/* Compass Legend */
.compass-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.legend-item.excellent .legend-dot {
    background: var(--feng-excellent);
}

.legend-item.good .legend-dot {
    background: var(--feng-good);
}

.legend-item.neutral .legend-dot {
    background: var(--feng-neutral);
}

.legend-item.caution .legend-dot {
    background: var(--feng-caution);
}

/* Direction Tooltip */
.direction-tooltip {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--feng-gold);
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.direction-tooltip.show {
    display: block;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.tooltip-icon {
    font-size: 2rem;
}

.tooltip-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.tooltip-content {
    color: #555;
    line-height: 1.7;
}

.tooltip-desc {
    margin-bottom: 15px;
}

.tooltip-tip {
    padding: 15px;
    background: linear-gradient(135deg, rgba(222, 181, 100, 0.1) 0%, rgba(139, 105, 20, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--feng-gold);
}

.tooltip-tip::before {
    content: '💡 팁: ';
    font-weight: 700;
}

/* Result Section */
.result-section {
    background: white;
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    animation: slideUp 0.6s ease;
}

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

/* Result Cards */
.result-card {
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
}

.best-direction {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(39, 174, 96, 0.05) 100%);
    border: 2px solid rgba(39, 174, 96, 0.3);
}

.caution-direction {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
    border: 2px solid rgba(231, 76, 60, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-icon {
    font-size: 1.8rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.best-dir-display,
.caution-dir-display {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.dir-icon {
    font-size: 3rem;
}

.dir-name {
    font-size: 1.8rem;
    font-weight: 800;
}

.best-direction .dir-name {
    color: var(--feng-excellent);
}

.caution-direction .dir-name {
    color: var(--feng-caution);
}

.best-dir-desc,
.caution-dir-desc {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Direction Detail */
.direction-detail {
    background: rgba(39, 174, 96, 0.08);
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
}

.direction-detail.caution {
    background: rgba(231, 76, 60, 0.08);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.detail-value {
    color: #333;
    font-weight: 500;
}

/* Section Subtitle */
.section-subtitle {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 25px;
}

/* Five Elements Section */
.five-elements-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.elements-wheel {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.element-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border-radius: 15px;
    min-width: 100px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.element-item.active {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.element-item.wood { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); }
.element-item.wood.active { border-color: #4CAF50; }
.element-item.fire { background: linear-gradient(135deg, #FFEBEE, #FFCDD2); }
.element-item.fire.active { border-color: #F44336; }
.element-item.earth { background: linear-gradient(135deg, #FFF8E1, #FFECB3); }
.element-item.earth.active { border-color: #FFC107; }
.element-item.metal { background: linear-gradient(135deg, #ECEFF1, #CFD8DC); }
.element-item.metal.active { border-color: #607D8B; }
.element-item.water { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); }
.element-item.water.active { border-color: #2196F3; }

.elem-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.elem-name {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
}

.elem-meaning {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

.element-advice {
    text-align: center;
    color: #555;
    line-height: 1.7;
    padding: 15px;
    background: rgba(222, 181, 100, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--feng-gold);
}

/* Space Fortune Section */
.space-fortune-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

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

.fortune-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    text-align: center;
}

.fortune-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.fortune-name {
    font-weight: 700;
    color: #333;
    display: block;
    margin-bottom: 12px;
}

.fortune-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
}

.fortune-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
}

.fortune-fill.high { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.fortune-fill.medium { background: linear-gradient(90deg, #f39c12, #f1c40f); }
.fortune-fill.low { background: linear-gradient(90deg, #e74c3c, #c0392b); }

.fortune-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Avoid Section */
.avoid-section {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.08), rgba(192, 57, 43, 0.05));
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.avoid-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.avoid-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    color: #c0392b;
    font-size: 0.95rem;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.1);
}

.avoid-list li::before {
    content: '❌';
    font-size: 1.2rem;
}

/* Color Recommendations */
.color-recommend-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.color-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
}

.color-name-rec {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.color-effect {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

/* Season Tips Section */
.season-tips-section {
    background: linear-gradient(135deg, rgba(222, 181, 100, 0.1), rgba(139, 105, 20, 0.05));
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.season-tip {
    text-align: center;
    color: #5C4A1F;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Action Points Section */
.action-points-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    transition: transform 0.2s;
}

.action-item:hover {
    transform: translateX(5px);
}

.action-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--feng-gold-dark), var(--feng-gold));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.action-text {
    color: #333;
    line-height: 1.6;
}

/* Daily Message Section */
.daily-message-section {
    background: linear-gradient(135deg, #FFF8DC, #FFEFD5);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    border-left: 5px solid var(--feng-gold);
}

.daily-message {
    font-size: 1.15rem;
    font-style: italic;
    color: #5C4A1F;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    border: none;
}

.daily-message::before {
    content: '"';
    font-size: 2rem;
    color: var(--feng-gold);
}

.daily-message::after {
    content: '"';
    font-size: 2rem;
    color: var(--feng-gold);
}

/* Fengshui Tips */
.fengshui-tips {
    margin-bottom: 30px;
}

.tips-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 4px solid var(--feng-gold);
    transition: all 0.3s ease;
}

.tip-item:hover {
    transform: translateX(5px);
    background: rgba(222, 181, 100, 0.1);
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
}

.tip-title-sm {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.tip-desc {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* Today's Energy */
.today-energy {
    background: linear-gradient(135deg, rgba(222, 181, 100, 0.15) 0%, rgba(139, 105, 20, 0.1) 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.energy-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--feng-gold-dark);
    text-align: center;
    margin-bottom: 25px;
}

.energy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.energy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.energy-label {
    font-size: 0.85rem;
    color: #666;
}

.energy-color {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.energy-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--feng-gold-dark);
}

.energy-value.large {
    font-size: 2rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-btn,
.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.retry-btn {
    background: white;
    border: 2px solid #C9A246;
    color: #8B6914;
}

.retry-btn:hover {
    background: linear-gradient(135deg, #8B6914 0%, #6B5210 100%);
    color: #FFF5D6;
    border-color: #8B6914;
}

.share-btn {
    background: linear-gradient(135deg, #8B6914 0%, #6B5210 100%);
    color: #FFF5D6;
    box-shadow: 0 5px 25px rgba(107, 82, 16, 0.3);
}

.share-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #9B7916 0%, #7B6212 100%);
    box-shadow: 0 10px 35px rgba(107, 82, 16, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .fengshui-header {
        padding: 40px 20px;
    }

    .fengshui-title {
        font-size: 1.8rem;
    }

    .header-icon {
        font-size: 3rem;
    }

    .space-selection {
        padding: 25px 20px;
    }

    .space-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .space-btn {
        padding: 20px 15px;
    }

    .space-icon {
        font-size: 2rem;
    }

    .compass-section {
        padding: 20px 10px;
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    .compass-container {
        max-width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    .compass-grid {
        gap: 4px;
        width: 100%;
        box-sizing: border-box;
        padding: 0 5px;
    }

    .compass-cell {
        padding: 8px 4px;
        border-radius: 10px;
        border-width: 2px;
    }

    .direction-icon {
        font-size: 1rem;
        line-height: 1;
    }

    .direction-name {
        font-size: 0.7rem;
        line-height: 1.2;
        word-break: keep-all;
    }

    .direction-status {
        font-size: 0.6rem;
        padding: 2px 5px;
        bottom: 4px;
        white-space: nowrap;
    }
    
    .compass-cell.center {
        padding: 8px 4px;
    }
    
    .compass-cell.center .direction-name {
        font-size: 0.65rem;
    }
    
    .needle-n {
        font-size: 0.8rem;
    }
    
    .needle-s {
        font-size: 0.65rem;
    }
    
    .needle-body {
        height: 25px;
        width: 6px;
    }

    .needle-body {
        height: 30px;
    }

    .compass-legend {
        gap: 15px;
    }

    .legend-item {
        font-size: 0.8rem;
    }

    .result-section {
        padding: 25px 20px;
    }

    .result-card {
        padding: 20px;
    }

    .dir-icon {
        font-size: 2rem;
    }

    .dir-name {
        font-size: 1.3rem;
    }

    .energy-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .elements-wheel {
        gap: 10px;
    }
    
    .element-item {
        min-width: 80px;
        padding: 15px 10px;
    }
    
    .elem-icon {
        font-size: 1.5rem;
    }
    
    .fortune-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .avoid-list {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .retry-btn,
    .share-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .fengshui-title {
        font-size: 1.5rem;
    }

    .space-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .space-btn {
        padding: 15px 10px;
    }

    .space-name {
        font-size: 0.85rem;
    }

    .compass-section {
        padding: 15px 8px;
    }
    
    .compass-container {
        padding: 0;
        max-width: 100%;
    }
    
    .compass-grid {
        gap: 3px;
        padding: 0 2px;
    }

    .compass-cell {
        padding: 4px 2px;
        min-width: 0;
        overflow: hidden;
        border-width: 2px;
        gap: 4px;
    }

    .direction-icon {
        font-size: 0.75rem;
        line-height: 1;
    }

    .direction-name {
        font-size: 0.55rem;
        word-break: keep-all;
        line-height: 1;
        font-weight: 600;
    }
    
    .direction-status {
        font-size: 0.5rem;
        padding: 1px 3px;
        bottom: 2px;
        border-radius: 8px;
    }
    
    .compass-cell.center {
        padding: 4px 2px;
    }
    
    .compass-cell.center .direction-name {
        font-size: 0.5rem;
    }
    
    .needle-n {
        font-size: 0.65rem;
    }
    
    .needle-s {
        font-size: 0.55rem;
    }
    
    .needle-body {
        height: 18px;
        width: 4px;
    }
    
    .compass-legend {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .legend-item {
        font-size: 0.7rem;
    }
    
    .legend-dot {
        width: 10px;
        height: 10px;
    }

    .tooltip-header {
        flex-direction: column;
        text-align: center;
    }
}


