body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6f7;
}

/* Или только у кнопок донатов */
.donation-btn,
.yoomoney-btn,
.donation-links a {
    text-decoration: none;
}

.white-block {
    background-color: white;
    max-width: 1200px;
    width: 80%;
    margin: 0px auto;
    padding: 0px 0px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 30px;
    border-radius: 16px 16px 0px 0px;
    background: #F3F3F3;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    line-height: 1;
    font-size: 20px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    display: block;
    flex-shrink: 0;
}

.logo span {
    line-height: 1.2;
}

.logo-image {
    height: 60px;
    width: auto;
    display: block;
}

nav a {
    margin-left: 15px;
    text-decoration: none;
    color: #555;
}

nav a.active {
    color: #2e86de;
}

.container {
    padding: 20px;
}

.info {
    color: black;
    font-size: 17px;
    padding: 5px 0px;
    line-height: 1.4;
}

.block {
    padding: 0px;
    border-radius: 16px;
    background-color: white;
}

.workspace {
    display: flex;
    margin-top: 5px;
    justify-content: center;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
}

.upload-area {
    width: 880px;
    border: 2px dashed black;
    background-color: #F2F4F6;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-height: 530px;
    height: auto;
    max-height: 530px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 15px;
    padding: 5px;
    transition: all 0.3s ease;
}

.upload-area::-webkit-scrollbar {
    width: 8px;
}

.upload-area::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.upload-area::-webkit-scrollbar-thumb {
    background: #0060AB;
    border-radius: 10px;
}

.upload-area::-webkit-scrollbar-thumb:hover {
    background: #004080;
}

@media (max-width: 1000px) {
    .upload-area {
        width: 100%;
    }
}

.upload-area.pipette-mode {
    cursor: crosshair;
    border-color: #2e86de;
    background-color: rgba(46, 134, 222, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 15px;
    width: 100%;
}

.image-preview {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 530px;
    overflow: auto;
}

#previewCanvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    cursor: crosshair;
}

.image-preview img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.btn {
    padding: 10px 80px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0060AB, #004080);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #0078D4, #0060AB);
    transform: translateY(-2px);
}

.icon {
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.color-preview {
    width: 90%;
    height: 90px;
    background: #ffffff;
    border-radius: 10px;
    border: 2px dashed black;
    cursor: crosshair;
    transition: all 0.2s ease;
    justify-content: center;
}

.color-preview.pipette-active {
    border-color: #2e86de;
    box-shadow: 0 0 0 3px rgba(46, 134, 222, 0.3);
}

.result-panel {
    background-color: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 270px;
    flex-shrink: 0;
}

.result p {
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
}

.color1 {
    width: 90%;
    height: 40px;
    border-radius: 10px;
    border: 2px dashed black;
    margin-bottom: 15px;
}

.input-wrapper {
    position: relative;
    width: 90%;
}

.input-row input {
    margin-top: 10px;
    width: 250px;
    height: 45px;
    border-radius: 10px;
    border: 1px solid #ccc;
    padding: 0 40px 0 15px;
    font-size: 14px;
    font-weight: normal;
    box-sizing: border-box;
    background: #fff;
    transition: all 0.3s ease;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.search-icon:hover {
    color: #2e86de;
}

.samples {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sample {
    width: 30px;
    height: 30px;
    display: inline-block;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sample:hover {
    transform: scale(1.1);
}

.sample.dark { background: #222; }
.sample.light { background: #eee; }
.sample.blue { background: #3498db; }
.sample.red { background: #e74c3c; }
.sample.gray { background: #ccc; }

.data-table {
    display: flex;
    margin-top: 15px;
    margin-bottom: 0;
    gap: 20px;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background: white;
}

.column {
    flex: 1;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    margin-bottom: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.row span:first-child {
    font-weight: bold;
    color: #555;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.value-with-copy {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-value {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 500;
    color: #0060AB;
    background: rgba(0, 96, 171, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: rgba(0, 96, 171, 0.1);
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-icon {
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.copy-btn:hover .copy-icon {
    opacity: 1;
}

/* Zoom-лупа */
.zoom-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 15px;
}

#zoomCanvas {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    border: 2px dashed black;
    background: #F2F4F6;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.picker-info {
    font-size: 13px;
}

.picker-header {
    margin-bottom: 15px;
}

.colorText {
    margin-bottom: 12px;
}

.colorText .label {
    font-size: 12px;
    font-weight: bold;
    color: #555;
    margin-bottom: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-wrapper input {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0 10px;
    font-size: 20px;
    background: #f8f9fa;
}

.copy-field-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.copy-field-btn:hover {
    background: rgba(0,96,171,0.1);
}

.main-canvas {
    width: 100%;
    height: auto;
    cursor: crosshair;
    border-radius: 8px;
}

.image-preview {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#mainCanvas {
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
    border-radius: 8px;
}

.upload-area.pipette-mode {
    cursor: crosshair;
    border-color: #2e86de;
    background-color: rgba(46, 134, 222, 0.05);
}

/* Футер */
.site-footer {
    margin-top: 40px;
    padding: 25px 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #eee;
    background: #F3F3F3;
    border-radius: 0 0 16px 16px;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright,
.footer-contact,
.footer-made {
    display: inline-block;
}

.site-footer a {
    color: #0060AB;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #004080;
    text-decoration: underline;
}

.heart {
    color: #ff4757;
    display: inline-block;
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ppp {
    font-size: 12px;
}

/* ========== БЛОК ОТТЕНКОВ ========== */
.shades-section {
    margin-top: 0px;
    padding: 5px 20px;
    background: #ffffff;
    border-radius: 16px;
}

.shades-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
    font-weight: 600;
}

.shades-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.scheme {
    flex: 1;
    min-width: 300px;
    background: #f2f4f6;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.scheme-title {
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 500;
    color: #666;
}

.colors {
    display: flex;
    flex-wrap: wrap;
    border-radius: 12px;
    border: 1px solid black;
    overflow: hidden;
    min-height: 120px;
}

.colors > div {
    flex: 1;
    min-width: 80px;
    height: 90px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.colors > div:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2;
}

.colors > div > div {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 8px;
}

.colors .codelink {
    font-size: 11px;
    text-decoration: none;
    background: rgba(0,0,0,0.6);
    padding: 3px 8px;
    border-radius: 4px;
    color: white;
    font-family: monospace;
    font-weight: 500;
    transition: all 0.2s;
}

.colors .codelink:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.02);
}

.colors .copy {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.colors > div:hover .copy {
    opacity: 1;
}

.colors .copy div {
    width: 14px;
    height: 14px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>') no-repeat center;
    background-size: contain;
}

.shade-placeholder {
    width: 100%;
    text-align: center;
    padding: 35px;
    color: #999;
    font-size: 14px;
}

/* ========== СКРЫТЫЕ СТРОКИ И КНОПКА ========== */
.hidden-row {
    display: none;
}

.data-table-wrapper {
    margin-top: 15px;
}

.show-more-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background: transparent;
    border: 2px solid #0060AB;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #0060AB;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.show-more-btn:hover {
    background: rgba(0, 96, 171, 0.1);
    border-color: #004080;
    color: #004080;
}

/* ============================================ */
/* ========== АДАПТАЦИЯ ПОД ПЛАНШЕТЫ ========== */
/* ============================================ */
@media (max-width: 992px) {
    .white-block {
        width: 90%;
    }
    
    .upload-area {
        width: 100%;
        min-height: 450px;
        max-height: 450px;
    }
    
    .image-preview {
        max-height: 450px;
    }
    
    .result-panel {
        width: 260px;
        padding: 20px;
    }
    
    .zoom-container {
        justify-content: center;
    }
    
    #zoomCanvas {
        width: 150px;
        height: 150px;
    }
    
    .btn {
        padding: 10px 50px;
    }
    
    .shades-title {
        font-size: 22px;
    }
    
    .scheme {
        min-width: 250px;
    }
    
    .colors > div {
        min-width: 65px;
        height: 75px;
    }
}

/* ============================================ */
/* ========== АДАПТАЦИЯ ПОД ТЕЛЕФОНЫ ========== */
/* ============================================ */
@media (max-width: 768px) {
    .white-block {
        width: 95%;
        margin: 10px auto;
    }
    
    .topbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .logo-icon {
        width: 45px;
        height: 45px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    nav a {
        margin-left: 0;
        font-size: 11px;
    }
    
    .container {
        padding: 15px;
    }
    
    .info {
        font-size: 14px;
        text-align: center;
    }
    
    .workspace {
        flex-direction: column;
        align-items: center;
    }
    
    .upload-area {
        width: 100%;
        min-height: 350px;
        max-height: 350px;
        padding: 10px;
    }
    
    .image-preview {
        max-height: 350px;
    }
    
    .result-panel {
        width: 100%;
        max-width: 100%;
        padding: 20px;
    }
    
    .zoom-container {
        justify-content: center;
    }
    
    #zoomCanvas {
        width: 130px;
        height: 130px;
    }
    
    .color-preview {
        height: 70px;
    }
    
    .color1 {
        height: 35px;
    }
    
    .input-row input {
        width: 100%;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 30px;
        width: 100%;
        font-size: 14px;
    }
    
    .data-table {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        margin-top: 10px;
    }
    
    .row {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .color-value {
        font-size: 11px;
    }
    
    .samples {
        justify-content: center;
    }
    
    .sample {
        width: 25px;
        height: 25px;
    }
    
    .shades-section {
        padding: 5px 15px;
    }
    
    .shades-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .shades-container {
        gap: 15px;
    }
    
    .scheme {
        min-width: 100%;
        padding: 15px;
    }
    
    .scheme-title {
        font-size: 14px;
    }
    
    .colors {
        min-height: 100px;
    }
    
    .colors > div {
        min-width: 50px;
        height: 60px;
    }
    
    .colors .codelink {
        font-size: 8px;
        padding: 2px 4px;
    }
    
    .show-more-btn {
        padding: 8px;
        font-size: 12px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .site-footer {
        padding: 20px 15px;
        font-size: 12px;
        margin-top: 30px;
    }
}

/* ============================================ */
/* ========== АДАПТАЦИЯ ПОД МАЛЕНЬКИЕ ТЕЛЕФОНЫ ========== */
/* ============================================ */
@media (max-width: 480px) {
    .white-block {
        width: 98%;
    }
    
    .topbar {
        padding: 10px 15px;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    nav a {
        font-size: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .info {
        font-size: 12px;
    }
    
    .upload-area {
        min-height: 280px;
        max-height: 280px;
    }
    
    .image-preview {
        max-height: 280px;
    }
    
    .result-panel {
        padding: 15px;
    }
    
    #zoomCanvas {
        width: 100px;
        height: 100px;
    }
    
    .color-preview {
        height: 60px;
    }
    
    .result p {
        font-size: 16px;
    }
    
    .color1 {
        height: 30px;
    }
    
    .btn {
        font-size: 13px;
        padding: 8px 20px;
    }
    
    .data-table {
        padding: 10px;
    }
    
    .row {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .color-value {
        font-size: 10px;
    }
    
    .copy-icon {
        width: 14px;
        height: 14px;
    }
    
    .shades-title {
        font-size: 16px;
    }
    
    .colors > div {
        min-width: 40px;
        height: 50px;
    }
    
    .colors .codelink {
        font-size: 7px;
        padding: 1px 3px;
    }
    
    .scheme-title {
        font-size: 12px;
    }
    
    .show-more-btn {
        font-size: 11px;
        padding: 6px;
    }
    
    .footer-copyright,
    .footer-contact,
    .footer-made {
        font-size: 10px;
    }
}

/* ============================================ */
/* ========== АДАПТАЦИЯ ПОД ПЛАНШЕТЫ В ЛАНДШАФТЕ ========== */
/* ============================================ */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .workspace {
        flex-direction: row;
    }
    
    .upload-area {
        width: 60%;
        min-height: 400px;
        max-height: 400px;
    }
    
    .result-panel {
        width: 35%;
    }
    
    #zoomCanvas {
        width: 120px;
        height: 120px;
    }
}

/* ============================================ */
/* ========== АДАПТАЦИЯ ПОД БОЛЬШИЕ ЭКРАНЫ ========== */
/* ============================================ */
@media (min-width: 1920px) {
    .white-block {
        max-width: 1400px;
    }
    
    .upload-area {
        width: 1000px;
    }
    
    .container {
        padding: 30px;
    }
    
    .info {
        font-size: 18px;
    }
    
    .btn {
        font-size: 18px;
        padding: 12px 100px;
    }
}