body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

.min-h-screen {
    min-height: 89.5vh;
}

.flex {
    display: flex;
}

.relative {
    position: relative;
}

.color-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: move;
    transition: transform 0.2s ease;
}

.color-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.button {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 24px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    padding: 8px;
}

.color-block:hover .button {
    opacity: 1;
}

.lock-btn {
    font-size: 24px;
}

.color-info {
    text-align: center;
    position: absolute;
    bottom: 15%;
    left: 0;
    right: 0;
}

.color-hex {
    font-size: 30px;
    bottom: 60px;
    left: 50px;
    font-weight: 500;
}

.color-name {
    font-size: 14px;
}

.add-color-btn {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

#color-palette:hover {
    opacity: 1;
}

.dragging {
    opacity: 0.5;
}

.fas {
    font-size: inherit; 
}

.delete-btn, .lock-btn, .drag-btn {
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.copy-btn {
    font-size: 24px;
}

.header {
    background-color: #f8f9fa;
    padding: 10px 20px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.header h1 {
    margin: 0;
    font-size: 32px;
    color: #000;
    white-space: nowrap;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.header h2.instruction {
    color: lightslategrey;
    font-size: 20px;
    margin-left: 20px;
    font-weight: 500;
}

.download-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-btn i {
    font-size: 18px;
}

.download-btn:hover {
    background-color: #0056b3;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    max-width: 400px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.download-options {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.download-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    margin: 0 5px;
}

.icon {
    font-size: 32px;
    margin-bottom: 5px;
}

.download-option:hover {
    background-color: #0056b3;
}

/* Add these new styles at the end of the file */

@media (max-width: 768px) {
    .header {
        padding: 10px;
    }

    .header h1 {
        font-size: 20px;
        margin-right: 10px;
    }

    .header h2.instruction {
        display: none; /* Hide the instruction on small screens */
    }

    .download-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .download-btn i {
        font-size: 14px;
    }

    .min-h-screen {
        min-height: calc(100vh - 50px);
    }

    #color-palette {
        flex-direction: column;
        height: calc(100vh - 50px);
    }

    .color-block {
        flex: 1;
        min-height: 0;
    }

    .color-hex {
        font-size: 16px;
    }

    .color-name {
        font-size: 10px;
    }

    .button {
        font-size: 16px;
        padding: 4px;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .download-options {
        flex-direction: column;
    }

    .download-option {
        margin: 5px 0;
    }
}

@media (max-width: 1024px) {
    .header {
        padding: 10px;
    }

    .header h1 {
        font-size: 20px;
        margin-right: 10px;
    }

    .header h2.instruction {
        display: none; /* Hide the instruction on medium screens */
    }

    .header-buttons {
        flex-direction: row;
        align-items: center;
    }

    .view-btn, .download-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .view-btn i, .download-btn i {
        font-size: 14px;
    }

    .min-h-screen {
        min-height: calc(100vh - 60px);
    }

    #color-palette {
        flex-direction: column;
        height: calc(100vh - 60px);
    }

    .color-block {
        flex: 1;
        min-height: 0;
    }

    .color-hex {
        font-size: 20px;
    }

    .color-name {
        font-size: 12px;
    }

    .button {
        font-size: 20px;
        padding: 6px;
    }

    .modal-content {
        width: 80%;
        margin: 10% auto;
    }

    .download-options {
        flex-direction: row;
    }

    .download-option {
        margin: 0 5px;
    }
}

@media (min-width: 1025px) {
    .header h2.instruction {
        display: block;
    }

    #color-palette {
        flex-direction: row;
    }

    .color-block {
        flex: 1;
    }
}

@media (hover: none) {
    .add-color-btn {
        opacity: 1;
    }
}

@media (min-width: 769px) {
    .header h2.instruction {
        display: inline-block;
    }
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.view-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px 20px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-btn i {
    font-size: 20px; /* Increased icon size */
}

.view-btn:hover {
    background-color: #218838;
}

#palette-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-top: 20px;
}

.color-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 150px;
}

.color-preview {
    width: 100px;
    height: 100px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .header-buttons {
        flex-direction: row;
    }

    .view-btn, .download-btn {
        width: 100%;
        margin-top: 5px;
    }
}

.footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    padding: 10px;
    text-align: center;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.generate-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.generate-btn i {
    margin-right: 5px;
}

.generate-btn:hover {
    background-color: #0056b3;
}

@media (max-width: 1024px) {
    .footer {
        display: block;
    }

    .min-h-screen {
        min-height: calc(100vh - 110px);
    }

    #color-palette {
        height: calc(100vh - 110px);
    }
}

/* Add these styles at the end of the file */

@media (max-width: 1024px) {
    .color-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px;
    }

    .color-info {
        position: static;
        text-align: left;
        display: flex;
        align-items: center;
        margin-left: 15px;
    }

    .color-hex {
        font-size: 24px;
        font-weight: bold;
        margin: 0;
    }

    .button-group {
        display: flex;
        gap: 10px;
        margin-right: 15px;
    }

    .button {
        opacity: 1;
        margin: 0;
        padding: 5px;
    }

    .color-block:hover .button {
        opacity: 1;
    }
}

.palette-details {
    display: flex;
    overflow-x: auto;
    margin-top: 20px;
    padding: 10px 0;
}

.color-preview {
    width: 50px;
    height: 50px;
    border: 1px solid #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.selected-color {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.selected-color .color-preview {
    width: 100px;
    height: 100px;
    border: 2px solid #000;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
}

.selected-color {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.selected-color .color-preview {
    width: 100px;
    height: 100px;
    border: 2px solid #000;
    border-radius: 5px;
    margin-bottom: 10px;
}

.palette-details {
    display: flex;
    overflow-x: auto;
    margin-top: 20px;
    padding: 10px 0;
}

.color-preview {
    width: 50px;
    height: 50px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 0 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.color-preview:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.modal-content {
    margin: 10% auto;
    padding: 20px;
    border: none;
    width: 80%;
    max-width: 600px;
}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
    }
}

@media (max-width: 1024px) {
    .header h2 {
        display: none;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 18px;
    }

    .view-btn, .download-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .view-btn i, .download-btn i {
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    .view-btn, .download-btn {
        padding: 10px 15px;
        font-size: 16px;
    }

    .view-btn i, .download-btn i {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .view-btn, .download-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .view-btn i, .download-btn i {
        font-size: 14px;
    }
}
