* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6, p, span, div, td, th, label, button {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Заголовки с умным переносом */
h1, h2, h3, h4 {
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Улучшенная мобильная адаптация */
@media (max-width: 1200px) {
    .container {
        padding: 20px;
        border-radius: 15px;
    }
    
    .main-content {
        gap: 20px;
    }
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: relative;
}

.header-actions {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    align-items: center;
}

.language-select {
    padding: 8px 12px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    color: #667eea;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.language-select:hover {
    background: #667eea;
    color: white;
}

.theme-toggle {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    background: #764ba2;
}

header h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
    max-width: 100%;
}

.subtitle {
    font-size: 1.2em;
    color: #666;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.compass-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.compass-container {
    position: relative;
    margin-bottom: 30px;
}

#compassCanvas {
    border: 5px solid #667eea;
    border-radius: 50%;
    background: #f8f9fa;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.compass-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.degree-display {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.mountain-name {
    font-size: 1.2em;
    color: #764ba2;
    font-weight: 600;
}

.controls {
    width: 100%;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.input-group label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
}

.input-group input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.input-group button,
button:not(.theme-toggle):not(.tooltip-close) {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background 0.3s;
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.input-group button:hover {
    background: #5568d3;
}

.slider-group {
    margin-bottom: 20px;
}

.slider-group label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

#degreeSlider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

#degreeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
}

#degreeSlider::-moz-range-thumb {
    border: none;
}

#degreeSlider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

#degreeSlider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

#degreeSlider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.quick-buttons {
    margin-top: 20px;
}

.quick-buttons h3 {
    margin-bottom: 10px;
    color: #555;
    font-size: 1em;
}

.direction-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.dir-btn {
    padding: 10px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.dir-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.info-card h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    min-height: 44px;
    gap: 10px;
}

.info-item .label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
    max-width: 40%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-shrink: 0;
}

.info-item .value {
    color: #333;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: right;
    flex: 1;
    min-width: 0;
}

.value.lucky {
    color: #28a745;
    font-weight: 700;
}

.value.unlucky {
    color: #dc3545;
}

.mountains-list {
    display: grid;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.mountain-item {
    padding: 10px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 0.9em;
}

.placeholder {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.mountains-table-section {
    margin-top: 40px;
}

.mountains-table-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

/* Поиск и фильтры */
.search-filters {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #555;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.filter-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th, td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 150px;
    font-size: 0.9em;
    line-height: 1.4;
    vertical-align: middle;
}

td:first-child {
    max-width: 60px;
}

td:nth-child(2) {
    max-width: 120px;
    font-weight: 600;
}

th {
    font-weight: 600;
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

tbody tr:hover {
    background: #f5f7fa;
    cursor: pointer;
}

tbody tr.selected {
    background: #e3f2fd;
    font-weight: 600;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-badge.lucky {
    background: #d4edda;
    color: #155724;
}

.status-badge.normal {
    background: #d1ecf1;
    color: #0c5460;
}

.btn-save-favorite {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

.btn-save-favorite:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}

.btn-save-favorite:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-export-pdf {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

.btn-export-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.btn-export-image {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

.btn-export-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

.favorites-list,
.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.favorite-item,
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    gap: 10px;
    min-height: 44px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.history-item {
    border-left-color: #17a2b8;
}

.favorite-info,
.history-info {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.favorite-info strong,
.history-info strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.favorite-info small,
.history-info small {
    color: #999;
    font-size: 0.85em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
}

.favorite-actions {
    display: flex;
    gap: 8px;
}

.btn-fav-load,
.btn-fav-remove,
.btn-history-load {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s;
}

.btn-history-load {
    background: #17a2b8;
    color: white;
}

.btn-history-load:hover {
    transform: scale(1.1);
    background: #138496;
}

.btn-fav-load {
    background: #4caf50;
    color: white;
}

.btn-fav-load:hover {
    transform: scale(1.1);
    background: #45a049;
}

.btn-fav-remove {
    background: #f44336;
    color: white;
}

.btn-fav-remove:hover {
    transform: scale(1.1);
    background: #da190b;
}

.gua-number-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gua-number-section h2 {
    color: #0277bd;
    margin-bottom: 10px;
    font-size: 2em;
    text-align: center;
}

.section-description {
    text-align: center;
    color: #555;
    margin-bottom: 25px;
    font-style: italic;
}

.gua-calculator {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.gua-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: end;
    margin-bottom: 25px;
}

.gua-inputs .input-group {
    display: flex;
    flex-direction: column;
}

.gua-inputs label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.gua-inputs input,
.gua-inputs select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.btn-calculate-gua {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0277bd 0%, #01579b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    white-space: nowrap;
}

.btn-calculate-gua:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(2, 119, 189, 0.4);
}

.gua-results {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

.gua-main-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.gua-main-info h3 {
    color: #0277bd;
    font-size: 1.8em;
    margin-bottom: 10px;
}

#guaNumberValue {
    color: #01579b;
    font-size: 2em;
    font-weight: bold;
}

.gua-description {
    margin-top: 10px;
    color: #555;
    font-size: 1.1em;
}

.gua-directions h4 {
    color: #0277bd;
    margin-bottom: 15px;
    font-size: 1.3em;
}

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

.direction-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #0277bd;
    transition: transform 0.2s;
}

.direction-card:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.direction-card h5 {
    color: #0277bd;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.direction-card p {
    color: #666;
    font-size: 0.9em;
    margin: 5px 0;
}

.room-analysis-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.room-analysis-section h2 {
    color: #667eea;
    margin-bottom: 25px;
    font-size: 2em;
    text-align: center;
}

.room-upload-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.upload-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.upload-box {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.upload-box:hover {
    background: #e9ecef;
    border-color: #764ba2;
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.upload-box p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 5px;
}

.upload-box small {
    color: #999;
}

.image-preview {
    margin-top: 15px;
    text-align: center;
}

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

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    display: block;
}

#baguaOverlay,
#luopanOverlay {
    border-radius: 10px;
    pointer-events: none;
    z-index: 10;
}

#baguaOverlay {
    opacity: 0.7;
}

#luopanOverlay {
    opacity: 0.9;
    pointer-events: auto;
    cursor: move;
    touch-action: pan-x pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#previewImage {
    position: relative;
    z-index: 1;
    max-width: 100%;
    height: auto;
    display: block;
}

.image-controls {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.image-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
}

.image-controls input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-remove {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-remove:hover {
    background: #c82333;
}

.analysis-settings {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.setting-group select,
.setting-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.setting-group select:focus,
.setting-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-analyze {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

.btn-analyze:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-analyze:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.analysis-results {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.analysis-results h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.recommendations-list {
    list-style: none;
    padding: 0;
}

.recommendations-list li {
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 5px;
}

.bagua-zones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.bagua-zone {
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 8px;
    text-align: center;
    border: 2px solid #ddd;
}

.bagua-zone h4 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 1em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.bagua-zone p {
    font-size: 0.9em;
    color: #555;
    margin: 5px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .container {
        padding: 20px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .direction-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .room-upload-area {
        grid-template-columns: 1fr;
    }
    
    .bagua-zones {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .symbols-filters {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .comparison-inputs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
        border-radius: 15px;
    }
    
    header {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    header h1 {
        font-size: 1.5em;
        line-height: 1.2;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-actions {
        position: static;
        transform: none;
        justify-content: center;
        width: 100%;
    }
    
    .theme-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.3em;
    }
    
    .language-select {
        padding: 10px 15px;
        font-size: 0.95em;
        min-height: 44px;
    }
    
    #compassCanvas {
        width: 280px;
        height: 280px;
    }
    
    .compass-container {
        margin-bottom: 20px;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .input-group label {
        min-width: auto;
        font-size: 0.95em;
    }
    
    .input-group input {
        padding: 12px;
        font-size: 1em;
        min-height: 44px;
    }
    
    .input-group button {
        padding: 12px 20px;
        min-height: 44px;
        font-size: 1em;
    }
    
    .direction-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .dir-btn {
        padding: 12px 8px;
        min-height: 44px;
        font-size: 0.9em;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .info-card h2 {
        font-size: 1.3em;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    
    .info-item .label {
        max-width: 100%;
        font-size: 0.95em;
    }
    
    .info-item .value {
        text-align: left;
        width: 100%;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #667eea #f0f0f0;
    }
    
    .table-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-container::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 4px;
    }
    
    .table-container::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 4px;
    }
    
    .favorites-list,
    .history-list {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    table {
        min-width: 600px;
        font-size: 0.85em;
    }
    
    th, td {
        padding: 10px 6px;
        font-size: 0.85em;
    }
    
    .bagua-zones {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .symbols-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .symbol-card {
        padding: 15px;
    }
    
    .room-upload-area {
        grid-template-columns: 1fr;
    }
    
    .upload-box {
        padding: 30px 20px;
        min-height: 200px;
    }
    
    .btn-analyze,
    .btn-calculate-gua,
    .btn-compare {
        padding: 15px;
        min-height: 50px;
        font-size: 1.1em;
    }
    
    .search-box input {
        padding: 12px 15px;
        min-height: 44px;
        font-size: 1em;
    }
    
    .filter-btn {
        padding: 10px 14px;
        min-height: 40px;
    }
    
    .comparison-controls {
        margin-bottom: 15px;
    }
    
    .comparison-inputs {
        grid-template-columns: 1fr;
    }
    
    .comparison-inputs input {
        padding: 12px;
        min-height: 44px;
    }
    
    .calendar-grid {
        gap: 3px;
    }
    
    .calendar-day {
        min-height: 45px;
        padding: 8px 4px;
        font-size: 0.85em;
    }
    
    .calendar-month-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar-month-nav button {
        width: 100%;
        padding: 12px;
        min-height: 44px;
    }
    
    .luopan-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .luopan-controls label {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .luopan-controls input {
        width: 100%;
        padding: 10px;
        min-height: 40px;
    }
    
    .luopan-controls button {
        width: 100%;
        padding: 10px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 12px;
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 1.3em;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    #compassCanvas {
        width: 250px;
        height: 250px;
    }
    
    .degree-display {
        font-size: 1.5em;
    }
    
    .mountain-name {
        font-size: 1em;
    }
    
    .info-card {
        padding: 15px;
    }
    
    .info-card h2 {
        font-size: 1.2em;
    }
    
    .direction-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dir-btn {
        padding: 10px 6px;
        font-size: 0.85em;
    }
    
    .mountains-table-section h2,
    .symbols-library-section h2,
    .calendar-section h2 {
        font-size: 1.5em;
    }
    
    table {
        min-width: 500px;
        font-size: 0.8em;
    }
    
    th, td {
        padding: 8px 4px;
        font-size: 0.8em;
    }
    
    .calendar-day {
        min-height: 40px;
        padding: 6px 2px;
        font-size: 0.75em;
    }
    
    .symbol-card h3 {
        font-size: 1.1em;
    }
    
    .bagua-zone {
        padding: 12px;
    }
    
    .bagua-zone h4 {
        font-size: 0.9em;
    }
    
    .upload-box {
        padding: 20px 15px;
        min-height: 150px;
    }
    
    .upload-icon {
        font-size: 3em;
    }
    
    .section-description {
        font-size: 0.9em;
    }
}

/* Темная тема */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #f0f0f0;
    font-weight: 500;
}

body.dark-theme .container {
    background: #1e1e2e;
    color: #f0f0f0;
}

body.dark-theme header {
    border-bottom-color: #667eea;
}

body.dark-theme header h1 {
    color: #a8b9e3;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-theme .subtitle {
    color: #b8c5d9;
    font-weight: 500;
}

body.dark-theme .info-card,
body.dark-theme .gua-calculator,
body.dark-theme .analysis-settings,
body.dark-theme .upload-container {
    background: #2a2a3e;
    color: #f0f0f0;
    border: 1px solid #3a3a4e;
}

body.dark-theme .info-card h2,
body.dark-theme .gua-calculator h2,
body.dark-theme .analysis-settings h2 {
    color: #a8b9e3;
    font-weight: 700;
}

body.dark-theme .info-item {
    background: #1a1a2e;
    color: #f0f0f0;
    border: 1px solid #2a2a3e;
}

body.dark-theme .info-item .label {
    color: #b8c5d9;
    font-weight: 600;
}

body.dark-theme .info-item .value {
    color: #ffffff;
    font-weight: 500;
}

body.dark-theme .favorite-item,
body.dark-theme .mountain-item,
body.dark-theme .direction-card,
body.dark-theme .bagua-zone {
    background: #1a1a2e;
    color: #f0f0f0;
    border: 1px solid #2a2a3e;
}

body.dark-theme .favorite-item h4,
body.dark-theme .mountain-item h4,
body.dark-theme .direction-card h4,
body.dark-theme .bagua-zone h4 {
    color: #a8b9e3;
    font-weight: 700;
}

body.dark-theme .favorite-item p,
body.dark-theme .mountain-item p,
body.dark-theme .direction-card p,
body.dark-theme .bagua-zone p {
    color: #e0e0e0;
    font-weight: 500;
}

body.dark-theme table {
    background: #2a2a3e;
    color: #f0f0f0;
    border: 1px solid #3a3a4e;
}

body.dark-theme th {
    color: #ffffff;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.dark-theme td {
    color: #f0f0f0;
    font-weight: 500;
}

body.dark-theme tbody tr {
    border-bottom: 1px solid #3a3a4e;
}

body.dark-theme tbody tr:hover {
    background: #1a1a2e;
    color: #ffffff;
}

body.dark-theme thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background: #1a1a2e;
    color: #f0f0f0;
    border-color: #555;
    font-weight: 500;
}

body.dark-theme input:focus,
body.dark-theme select:focus,
body.dark-theme textarea:focus {
    border-color: #667eea;
    background: #1e1e2e;
    color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

body.dark-theme .input-group label {
    color: #b8c5d9;
    font-weight: 600;
}

body.dark-theme button:not(.theme-toggle) {
    font-weight: 600;
}

body.dark-theme #compassCanvas {
    border-color: #667eea;
    background: #1a1a2e;
}

body.dark-theme .degree-display {
    color: #a8b9e3;
    font-weight: 700;
}

body.dark-theme .mountain-name {
    color: #b8c5d9;
    font-weight: 600;
}

body.dark-theme .dir-btn {
    color: #f0f0f0;
    font-weight: 600;
    border: 1px solid #3a3a4e;
}

body.dark-theme .dir-btn:hover {
    color: #ffffff;
    border-color: #667eea;
}

body.dark-theme .section-description {
    color: #b8c5d9;
    font-weight: 500;
}

/* Библиотека символов в тёмной теме */
body.dark-theme .symbols-library-section {
    background: linear-gradient(135deg, #2a2a3e 0%, #1e1e2e 100%);
    border: 1px solid #3a3a4e;
}

body.dark-theme .symbols-library-section h2 {
    color: #b8c9e8;
    font-weight: 700;
}

body.dark-theme .symbols-filters {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
}

body.dark-theme .filter-group label {
    color: #c5d2e5;
    font-weight: 600;
}

body.dark-theme .filter-group select {
    background: #1a1a2e;
    color: #f0f0f0;
    border-color: #555;
    font-weight: 500;
}

body.dark-theme .symbol-card {
    background: #1a1a2e;
    border: 1px solid #3a3a4e;
    color: #f0f0f0;
}

body.dark-theme .symbol-card:hover {
    background: #2a2a3e;
    border-color: #667eea;
}

body.dark-theme .symbol-card h3 {
    color: #b8c9e8;
    font-weight: 700;
}

body.dark-theme .symbol-card .symbol-category {
    color: #c5d2e5;
    font-weight: 600;
}

body.dark-theme .symbol-card .symbol-info p {
    color: #e0e0e0;
    font-weight: 500;
}

body.dark-theme .symbol-card .symbol-info strong {
    color: #ffffff;
    font-weight: 600;
}

/* Календарь в тёмной теме */
body.dark-theme .calendar-section {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
}

body.dark-theme .calendar-section h2 {
    color: #b8c9e8;
    font-weight: 700;
}

body.dark-theme .calendar-controls {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
}

body.dark-theme .calendar-controls select,
body.dark-theme .calendar-controls input {
    background: #1a1a2e;
    color: #f0f0f0;
    border-color: #555;
    font-weight: 500;
}

body.dark-theme .calendar-grid {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
}

body.dark-theme .calendar-day {
    background: #1a1a2e;
    color: #f0f0f0;
    border: 1px solid #3a3a4e;
    font-weight: 500;
}

body.dark-theme .calendar-day:hover {
    background: #2a2a3e;
    color: #ffffff;
}

body.dark-theme .calendar-day.favorable {
    background: #2d4a2d;
    color: #b8e6b8;
    font-weight: 600;
    border-color: #4a7a4a;
}

body.dark-theme .calendar-day.unfavorable {
    background: #4a2d2d;
    color: #e6b8b8;
    font-weight: 500;
    border-color: #7a4a4a;
}

body.dark-theme .calendar-day.today {
    border: 2px solid #667eea;
    background: #2a2a3e;
}

body.dark-theme .calendar-day-header {
    background: #1a1a2e;
    color: #b8c9e8;
    font-weight: 700;
}

body.dark-theme .calendar-info {
    background: #2a2a3e;
    color: #f0f0f0;
    border: 1px solid #3a3a4e;
}

body.dark-theme .calendar-info h4 {
    color: #b8c9e8;
    font-weight: 700;
}

body.dark-theme .calendar-info p {
    color: #e0e0e0;
    font-weight: 500;
}

body.dark-theme .calendar-info small {
    color: #c5d2e5;
    font-weight: 500;
}

/* Дополнительные элементы в тёмной теме */
body.dark-theme .upload-box {
    background: #2a2a3e;
    border: 2px dashed #555;
    color: #f0f0f0;
}

body.dark-theme .upload-box:hover {
    border-color: #667eea;
    background: #2e2e4e;
}

body.dark-theme .recommendations-list li {
    background: #1a1a2e;
    color: #f0f0f0;
    border-left-color: #667eea;
}

body.dark-theme .analysis-results {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
    color: #f0f0f0;
}

body.dark-theme .analysis-results h3 {
    color: #b8c9e8;
    border-bottom-color: #667eea;
    font-weight: 700;
}

/* Поиск в тёмной теме */
body.dark-theme .search-box input {
    background: #1a1a2e;
    color: #f0f0f0;
    border-color: #555;
    font-weight: 500;
}

body.dark-theme .search-box input:focus {
    border-color: #667eea;
    background: #1e1e2e;
    color: #ffffff;
}

body.dark-theme .search-box input::placeholder {
    color: #888;
}

/* История и избранное в тёмной теме */
body.dark-theme .history-item,
body.dark-theme .favorite-item {
    background: #1a1a2e;
    border: 1px solid #3a3a4e;
    color: #f0f0f0;
}

body.dark-theme .history-item:hover,
body.dark-theme .favorite-item:hover {
    background: #2a2a3e;
    border-color: #667eea;
}

body.dark-theme .history-info strong,
body.dark-theme .favorite-info strong {
    color: #b8c9e8;
    font-weight: 700;
}

body.dark-theme .history-info small,
body.dark-theme .favorite-info small {
    color: #c5d2e5;
    font-weight: 500;
}

/* Проекты в тёмной теме */
body.dark-theme .projects-section {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
    color: #f0f0f0;
}

body.dark-theme .projects-section h3 {
    color: #b8c9e8;
    font-weight: 700;
}

body.dark-theme .project-item {
    background: #1a1a2e;
    border: 1px solid #3a3a4e;
    color: #f0f0f0;
}

body.dark-theme .project-item:hover {
    background: #2a2a3e;
    border-color: #667eea;
}

body.dark-theme .project-info h4 {
    color: #b8c9e8;
    font-weight: 700;
}

body.dark-theme .project-info p {
    color: #e0e0e0;
    font-weight: 500;
}

body.dark-theme .project-info small {
    color: #c5d2e5;
    font-weight: 500;
}

/* Сравнение направлений в тёмной теме */
body.dark-theme .comparison-controls {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
    color: #f0f0f0;
}

body.dark-theme .comparison-inputs input {
    background: #1a1a2e;
    color: #f0f0f0;
    border-color: #555;
    font-weight: 500;
}

body.dark-theme .comparison-inputs input:focus {
    border-color: #667eea;
    background: #1e1e2e;
    color: #ffffff;
}

body.dark-theme .comparison-results {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
    color: #f0f0f0;
}

body.dark-theme .comparison-table {
    background: #2a2a3e;
    color: #f0f0f0;
}

body.dark-theme .comparison-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 700;
}

body.dark-theme .comparison-table td {
    color: #f0f0f0;
    font-weight: 500;
}

body.dark-theme .comparison-table tbody tr.best-comparison {
    background: #1a4a2a;
    color: #b8e6b8;
}

body.dark-theme .comparison-table tbody tr:hover {
    background: #1a1a2e;
}

/* Модальные окна в тёмной теме */
body.dark-theme .symbol-details-modal {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
    color: #f0f0f0;
}

body.dark-theme .symbol-details-modal h3 {
    color: #b8c9e8;
    font-weight: 700;
}

body.dark-theme .symbol-details-modal p {
    color: #e0e0e0;
    font-weight: 500;
}

/* Скроллбары в тёмной теме */
body.dark-theme .table-container::-webkit-scrollbar-track {
    background: #1a1a2e;
}

body.dark-theme .table-container::-webkit-scrollbar-thumb {
    background: #667eea;
}

body.dark-theme .table-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Библиотека символов */
.symbols-library-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.symbols-library-section h2 {
    color: #e65100;
    margin-bottom: 10px;
    font-size: 2em;
    text-align: center;
}

.symbols-filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.filter-group select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.btn-filter {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    align-self: end;
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.symbol-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.symbol-card h3 {
    color: #ff9800;
    margin-bottom: 10px;
    font-size: 1.3em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.symbol-card .symbol-category {
    display: inline-block;
    padding: 4px 10px;
    background: #ffe0b2;
    border-radius: 15px;
    font-size: 0.85em;
    color: #e65100;
    margin-bottom: 10px;
}

.symbol-card .symbol-info {
    margin-top: 10px;
}

.symbol-card .symbol-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.symbol-card .symbol-info strong {
    color: #333;
}

.symbol-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.symbol-details-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2em;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: #333;
}

/* Проекты */
.projects-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.projects-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.projects-list {
    display: grid;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.project-info h4 {
    color: #667eea;
    margin-bottom: 5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.project-info p {
    color: #666;
    font-size: 0.9em;
    margin: 5px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.project-info small {
    color: #999;
    font-size: 0.85em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.project-actions {
    display: flex;
    gap: 8px;
}

.btn-project-load,
.btn-project-delete {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.btn-project-load {
    background: #4caf50;
    color: white;
}

.btn-project-load:hover {
    background: #45a049;
}

.btn-project-delete {
    background: #f44336;
    color: white;
}

.btn-project-delete:hover {
    background: #da190b;
}

.btn-save-project {
    padding: 12px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-save-project:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Система подсказок */
.help-tooltip {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 350px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.tooltip-content h3 {
    margin-bottom: 10px;
}

.tooltip-close {
    float: right;
    cursor: pointer;
    font-size: 1.5em;
    line-height: 1;
    opacity: 0.8;
}

.tooltip-close:hover {
    opacity: 1;
}

/* Tooltip на элементах */
[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: nowrap;
    z-index: 1001;
    pointer-events: none;
    margin-top: 5px;
}

/* Сравнение направлений */
.comparison-controls {
    margin-bottom: 20px;
}

.comparison-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.comparison-inputs input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.comparison-inputs input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-compare,
.btn-clear-compare {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    transition: transform 0.2s;
}

.btn-compare {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-compare:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-clear-compare {
    background: #6c757d;
    color: white;
}

.btn-clear-compare:hover {
    background: #5a6268;
}

.comparison-results {
    margin-top: 20px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.comparison-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.comparison-table tbody tr.best-comparison {
    background: #d4edda;
    font-weight: 600;
}

/* Компас Лопань */
#luopanOverlay {
    z-index: 10;
}

.luopan-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.luopan-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

.luopan-controls input[type="range"] {
    width: 80px;
}

.luopan-controls input[type="number"] {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.luopan-controls button {
    padding: 5px 10px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

/* Календарь благоприятных дат */
.calendar-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fff9e6 0%, #ffe6cc 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.calendar-section h2 {
    color: #e65100;
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

.calendar-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.calendar-controls select,
.calendar-controls input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background: white;
    padding: 10px;
    border-radius: 10px;
}

.calendar-day {
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calendar-day:hover {
    background: #f0f0f0;
}

.calendar-day.favorable {
    background: #d4edda;
    color: #155724;
    font-weight: 600;
}

.calendar-day.unfavorable {
    background: #f8d7da;
    color: #721c24;
}

.calendar-day.today {
    border: 2px solid #667eea;
}

.calendar-day-header {
    font-weight: 600;
    color: #667eea;
    background: #f8f9fa;
}

.calendar-month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-month-nav button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
}

.calendar-month-nav button:hover {
    background: #5568d3;
}

.calendar-info {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
}

.calendar-info h4,
.calendar-info p,
.calendar-info small {
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 5px 0;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* Дополнительные улучшения для мобильных */
@media (max-width: 768px) {
    /* Плавный скролл */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Улучшение для всех скроллируемых элементов */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Улучшение для input полей на мобильных */
    input[type="text"],
    input[type="number"],
    input[type="range"],
    select,
    textarea {
        font-size: 16px !important; /* Предотвращает zoom на iOS */
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
    }
    
    /* Улучшение для модальных окон */
    .symbol-details-modal {
        padding: 20px;
    }
    
    /* Улучшение для карточек */
    .info-card,
    .gua-calculator,
    .analysis-settings {
        margin-bottom: 20px;
    }
    
    /* Компактные секции */
    .section-description {
        font-size: 0.9em;
        margin-bottom: 15px;
    }
    
    /* Улучшения тёмной темы для мобильных */
    body.dark-theme {
        font-size: 16px;
        font-weight: 500;
        line-height: 1.6;
    }
    
    body.dark-theme header h1 {
        font-size: 1.6em;
        font-weight: 700;
        color: #b8c9e8;
        line-height: 1.3;
    }
    
    body.dark-theme .subtitle {
        font-size: 1.05em;
        font-weight: 500;
        color: #c5d2e5;
    }
    
    body.dark-theme .info-card h2,
    body.dark-theme .gua-calculator h2,
    body.dark-theme .analysis-settings h2 {
        font-size: 1.4em;
        font-weight: 700;
        color: #b8c9e8;
    }
    
    body.dark-theme .info-item {
        font-size: 1em;
        padding: 14px;
    }
    
    body.dark-theme .info-item .label {
        font-size: 1em;
        font-weight: 600;
        color: #c5d2e5;
    }
    
    body.dark-theme .info-item .value {
        font-size: 1.05em;
        font-weight: 600;
        color: #ffffff;
    }
    
    body.dark-theme .input-group label {
        font-size: 1em;
        font-weight: 600;
        color: #c5d2e5;
    }
    
    body.dark-theme input,
    body.dark-theme select,
    body.dark-theme textarea {
        font-size: 16px !important;
        font-weight: 500;
        color: #f0f0f0;
        background: #1a1a2e;
        border-color: #555;
        padding: 13px;
    }
    
    body.dark-theme input:focus,
    body.dark-theme select:focus,
    body.dark-theme textarea:focus {
        color: #ffffff;
        background: #1e1e2e;
        border-color: #667eea;
        font-weight: 500;
    }
    
    body.dark-theme .dir-btn {
        font-size: 0.95em;
        font-weight: 600;
        color: #f0f0f0;
        padding: 13px 10px;
    }
    
    body.dark-theme button:not(.theme-toggle) {
        font-size: 1.05em;
        font-weight: 600;
    }
    
    body.dark-theme th,
    body.dark-theme td {
        font-size: 0.9em;
        font-weight: 500;
        padding: 12px 8px;
    }
    
    body.dark-theme th {
        font-weight: 700;
        color: #ffffff;
    }
    
    body.dark-theme td {
        color: #f0f0f0;
    }
    
    body.dark-theme .bagua-zone h4 {
        font-size: 1em;
        font-weight: 700;
        color: #b8c9e8;
    }
    
    body.dark-theme .bagua-zone p {
        font-size: 0.95em;
        font-weight: 500;
        color: #e0e0e0;
        line-height: 1.5;
    }
    
    body.dark-theme .favorite-item h4,
    body.dark-theme .mountain-item h4 {
        font-size: 1.05em;
        font-weight: 700;
        color: #b8c9e8;
    }
    
    body.dark-theme .favorite-item p,
    body.dark-theme .mountain-item p {
        font-size: 1em;
        font-weight: 500;
        color: #e0e0e0;
        line-height: 1.5;
    }
    
    body.dark-theme .section-description {
        font-size: 0.95em;
        font-weight: 500;
        color: #c5d2e5;
        line-height: 1.6;
    }
    
    body.dark-theme .degree-display {
        font-size: 1.8em;
        font-weight: 700;
        color: #b8c9e8;
    }
    
    body.dark-theme .mountain-name {
        font-size: 1.1em;
        font-weight: 600;
        color: #c5d2e5;
    }
    
    body.dark-theme .language-select {
        font-size: 1em;
        font-weight: 600;
    }
}

/* Альбомная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 10px;
    }
    
    header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    header h1 {
        font-size: 1.3em;
        margin-bottom: 5px;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    #compassCanvas {
        width: 220px;
        height: 220px;
    }
    
    .main-content {
        gap: 15px;
    }
    
    .info-card {
        padding: 15px;
    }
    
    /* Тёмная тема в альбомной ориентации */
    body.dark-theme header h1 {
        font-size: 1.4em;
        font-weight: 700;
        color: #b8c9e8;
    }
    
    body.dark-theme .subtitle {
        font-size: 0.95em;
        color: #c5d2e5;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 10px;
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 1.2em;
    }
    
    .subtitle {
        font-size: 0.85em;
    }
    
    #compassCanvas {
        width: 220px;
        height: 220px;
    }
    
    .degree-display {
        font-size: 1.3em;
    }
    
    .mountain-name {
        font-size: 0.95em;
    }
    
    .info-card h2 {
        font-size: 1.1em;
    }
    
    .direction-buttons {
        grid-template-columns: 1fr;
    }
    
    .dir-btn {
        padding: 12px;
        font-size: 0.9em;
    }
    
    /* Тёмная тема на очень маленьких экранах */
    body.dark-theme header h1 {
        font-size: 1.3em;
        font-weight: 700;
        color: #b8c9e8;
    }
    
    body.dark-theme .subtitle {
        font-size: 0.9em;
        color: #c5d2e5;
    }
    
    body.dark-theme .info-card h2 {
        font-size: 1.15em;
        font-weight: 700;
        color: #b8c9e8;
    }
    
    body.dark-theme .info-item .label {
        font-size: 0.95em;
        font-weight: 600;
    }
    
    body.dark-theme .info-item .value {
        font-size: 1em;
        font-weight: 600;
    }
    
    body.dark-theme .dir-btn {
        font-size: 0.95em;
        font-weight: 600;
    }
}

/* ========================================
   НОВЫЕ ФУНКЦИИ - СТИЛИ
   ======================================== */

/* Функция 1: GPS Компас */
.gps-compass-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    border: 2px solid #2196f3;
}

.gps-compass-section h3 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.gps-status {
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 5px;
    font-size: 0.9em;
}

.gps-status- success {
    color: #28a745;
    font-weight: 600;
}

.gps-status- error {
    color: #dc3545;
    font-weight: 600;
}

.gps-status- info {
    color: #17a2b8;
}

.btn-gps {
    padding: 12px 24px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.3s;
}

.btn-gps:hover {
    background: #1976d2;
}

.gps-info {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 5px;
}

.gps-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.gps-item:last-child {
    border-bottom: none;
}

.gps-label {
    font-weight: 600;
    color: #555;
}

.gps-value {
    font-weight: 700;
    color: #2196f3;
}

.gps-value.active {
    font-size: 1.2em;
    color: #1976d2;
}

.btn-calibrate {
    padding: 8px 16px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
}

.btn-calibrate:hover {
    background: #f57c00;
}

/* Темная тема для GPS компаса */
body.dark-theme .gps-compass-section {
    background: linear-gradient(135deg, #1a2a3e 0%, #1e3a4e 100%);
    border-color: #667eea;
}

body.dark-theme .gps-status {
    background: #2a2a3e;
    color: #f0f0f0;
}

body.dark-theme .gps-info {
    background: #2a2a3e;
    color: #f0f0f0;
}

body.dark-theme .gps-item {
    border-bottom-color: #3a3a4e;
}

body.dark-theme .gps-label {
    color: #c5d2e5;
}

body.dark-theme .gps-value {
    color: #b8c9e8;
}

/* ========================================
   ФУНКЦИИ 2-10: CSS СТИЛИ
   ======================================== */

/* Функция 2: Генератор цветовых палитр */
.color-palette-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fff9e6 0%, #ffe0b2 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.color-palette-section h2 {
    color: #ff9800;
    margin-bottom: 15px;
    font-size: 2em;
    text-align: center;
}

.palette-controls {
    margin-bottom: 25px;
}

.palette-controls label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
}

.palette-controls select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.palette-preview {
    display: none;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.palette-colors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.color-card {
    height: 120px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.color-card:hover {
    transform: scale(1.1);
}

.color-hex {
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
}

.palette-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.palette-export {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-export-palette {
    padding: 10px 20px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-export-palette:hover {
    background: #f57c00;
}

/* Функция 3: Рекомендации по растениям */
.plants-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.plants-section h2 {
    color: #2e7d32;
    margin-bottom: 15px;
    font-size: 2em;
    text-align: center;
}

.plants-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.plants-filters select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.plant-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.plant-card:hover {
    transform: translateY(-5px);
}

.plant-icon {
    font-size: 3em;
    text-align: center;
    margin-bottom: 10px;
}

.plant-card h3 {
    color: #2e7d32;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.plant-element,
.plant-light {
    color: #666;
    font-size: 0.9em;
    margin: 5px 0;
}

.plant-description {
    margin-top: 10px;
    color: #555;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Функция 4: Визуализация потоков энергии */
.energy-flow-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.energy-flow-section h2 {
    color: #0277bd;
    margin-bottom: 15px;
    font-size: 2em;
    text-align: center;
}

.energy-flow-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn-analyze-energy,
.btn-energy-recommendations {
    padding: 12px 24px;
    background: #0277bd;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-analyze-energy:hover,
.btn-energy-recommendations:hover {
    background: #01579b;
}

.energy-flow-visualization {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#energyFlowCanvas {
    width: 100%;
    max-width: 800px;
    height: auto;
    border: 2px solid #0277bd;
    border-radius: 10px;
}

.energy-legend {
    margin-top: 15px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Функция 5: Система напоминаний */
.reminders-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.reminders-section h2 {
    color: #7b1fa2;
    margin-bottom: 15px;
    font-size: 2em;
    text-align: center;
}

.reminders-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn-request-permission,
.btn-add-reminder {
    padding: 12px 24px;
    background: #7b1fa2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-request-permission:hover,
.btn-add-reminder:hover {
    background: #6a1b9a;
}

.reminders-list {
    display: grid;
    gap: 15px;
}

.reminder-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reminder-date {
    font-weight: 600;
    color: #7b1fa2;
}

.reminder-text {
    flex: 1;
    margin: 0 15px;
    color: #555;
}

.btn-delete-reminder {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2em;
}

/* Функция 6: Расчет совместимости пары */
.couple-compatibility-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.couple-compatibility-section h2 {
    color: #e65100;
    margin-bottom: 15px;
    font-size: 2em;
    text-align: center;
}

.couple-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.person-input {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.person-input h3 {
    color: #e65100;
    margin-bottom: 15px;
}

.person-input input,
.person-input select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.btn-calculate-couple {
    width: 100%;
    padding: 15px;
    background: #e65100;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-calculate-couple:hover {
    background: #d84315;
}

.compatibility-results {
    margin-top: 25px;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.compatibility-score {
    text-align: center;
    margin-bottom: 20px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 auto 15px;
}

.compatibility-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.compatibility-recommendations ul {
    list-style: none;
    padding: 0;
}

.compatibility-recommendations li {
    padding: 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 5px;
}

/* Функция 7: Планировщик перестановки мебели */
.furniture-planner-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #eceff1 0%, #cfd8dc 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.furniture-planner-section h2 {
    color: #37474f;
    margin-bottom: 15px;
    font-size: 2em;
    text-align: center;
}

.planner-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn-load-template,
.btn-add-furniture,
.btn-check-placement {
    padding: 12px 24px;
    background: #37474f;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-load-template:hover,
.btn-add-furniture:hover,
.btn-check-placement:hover {
    background: #263238;
}

.planner-workspace {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#furnitureCanvas {
    width: 100%;
    max-width: 800px;
    border: 2px solid #37474f;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.furniture-palette {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Функция 8: Система оценок энергетики */
.energy-rating-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.energy-rating-section h2 {
    color: #00695c;
    margin-bottom: 15px;
    font-size: 2em;
    text-align: center;
}

.btn-calculate-rating {
    width: 100%;
    padding: 15px;
    background: #00695c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 25px;
}

.btn-calculate-rating:hover {
    background: #004d40;
}

.rating-results {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.rating-overall {
    text-align: center;
    margin-bottom: 25px;
}

.rating-score {
    font-size: 3em;
    font-weight: 700;
    color: #00695c;
    margin-bottom: 15px;
}

.rating-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: linear-gradient(90deg, #00695c 0%, #00acc1 100%);
    transition: width 0.5s;
}

.rating-breakdown {
    margin-top: 25px;
}

.rating-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

/* Функция 9: Благоприятное время суток */
.favorable-time-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.favorable-time-section h2 {
    color: #c2185b;
    margin-bottom: 15px;
    font-size: 2em;
    text-align: center;
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.time-inputs label {
    font-weight: 600;
    color: #555;
}

.time-inputs select,
.time-inputs input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.favorable-times {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.time-slot {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #c2185b;
}

.time-icon {
    font-size: 2em;
    display: block;
    margin-bottom: 5px;
}

.time-value {
    font-weight: 600;
    color: #c2185b;
    font-size: 1.1em;
}

/* Функция 10: Чек-лист аудита Фен-Шуй */
.audit-checklist-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.audit-checklist-section h2 {
    color: #f57f17;
    margin-bottom: 15px;
    font-size: 2em;
    text-align: center;
}

.checklist-progress {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f57f17 0%, #fbc02d 100%);
    transition: width 0.5s;
}

#checklistPercentage {
    font-size: 1.5em;
    font-weight: 700;
    color: #f57f17;
    text-align: center;
    display: block;
}

.checklist-categories {
    display: grid;
    gap: 25px;
    margin-bottom: 25px;
}

.checklist-category {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.checklist-category h3 {
    color: #f57f17;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.checklist-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    cursor: pointer;
}

.checklist-item:hover {
    background: #e9ecef;
}

.checklist-item input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checklist-item span {
    flex: 1;
    color: #555;
    font-size: 0.95em;
}

.btn-export-checklist {
    width: 100%;
    padding: 15px;
    background: #f57f17;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-export-checklist:hover {
    background: #f57c00;
}

/* Темная тема для всех новых функций */
body.dark-theme .color-palette-section,
body.dark-theme .plants-section,
body.dark-theme .energy-flow-section,
body.dark-theme .reminders-section,
body.dark-theme .couple-compatibility-section,
body.dark-theme .furniture-planner-section,
body.dark-theme .energy-rating-section,
body.dark-theme .favorable-time-section,
body.dark-theme .audit-checklist-section {
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
}

body.dark-theme .palette-preview,
body.dark-theme .plant-card,
body.dark-theme .reminder-item,
body.dark-theme .person-input,
body.dark-theme .compatibility-results,
body.dark-theme .rating-results,
body.dark-theme .favorable-times,
body.dark-theme .checklist-category,
body.dark-theme .checklist-progress {
    background: #1a1a2e;
    border: 1px solid #3a3a4e;
    color: #f0f0f0;
}

body.dark-theme .checklist-item {
    background: #2a2a3e;
    color: #f0f0f0;
}

body.dark-theme .checklist-item:hover {
    background: #1a1a2e;
}

/* Мобильная адаптация для новых функций */
@media (max-width: 768px) {
    .color-palette-section,
    .plants-section,
    .energy-flow-section,
    .reminders-section,
    .couple-compatibility-section,
    .furniture-planner-section,
    .energy-rating-section,
    .favorable-time-section,
    .audit-checklist-section {
        padding: 20px;
        margin-top: 25px;
    }
    
    .couple-inputs {
        grid-template-columns: 1fr;
    }
    
    .time-inputs {
        grid-template-columns: 1fr;
    }
    
    .palette-colors {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .plants-grid {
        grid-template-columns: 1fr;
    }
    
    .planner-controls,
    .energy-flow-controls,
    .reminders-controls {
        flex-direction: column;
    }
    
    .planner-controls button,
    .energy-flow-controls button,
    .reminders-controls button {
        width: 100%;
    }
    
    #furnitureCanvas {
        width: 100%;
        height: auto;
    }
    
    #energyFlowCanvas {
        width: 100%;
        height: auto;
    }
}

