/* Tile Modal Styles */
/* Modal backdrop styles */
.tile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0);
    pointer-events: none;
}

.tile-modal.show {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    pointer-events: auto;
}

/* Modal content styles */
.tile-modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    will-change: transform, opacity;
}

.tile-modal.show .tile-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
    transition-delay: 0.1s;
}

.tile-modal-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tile-modal-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    align-items: baseline;
}

.tile-modal-hosting {
    margin-left: 4px;
    position: relative;
    top: -3px; /* Fine-tune vertical alignment */
}

.tile-modal-hosting .hosting {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tile-modal-hosting .hosting[data-host="neocities"] {
    background: rgba(29, 155, 240, 0.2);
    color: #1d9bf0;
}

.tile-modal-hosting .hosting[data-host="drachenplasma"] {
    background: rgba(0, 199, 60, 0.2);
    color: #00c73c;
}

.tile-modal-hosting .hosting[data-host="netlify"] {
    background: rgba(18, 147, 154, 0.2);
    color: #12939a;
}

.tile-modal-body {
    padding: 24px;
}

.tile-modal-title {
    font-size: 1.5rem;
    margin: 0 0 12px;
    color: #fff;
}

.tile-modal-description {
    color: #b0b0c0;
    margin-bottom: 24px;
    line-height: 1.6;
}

.tile-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
    align-items: center;
}

.tile-modal-button {
    min-width: 44px;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

/* Specific styles for the primary button with text */
.tile-modal-button.primary {
    background: linear-gradient(135deg, #4a6cf7 0%, #8a2be2 100%);
    color: white;
    padding: 0 24px;
    border: none;
    border-radius: 99px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.2s ease;
}

.tile-modal-button.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
}

/* Specific styles for the secondary button */
.tile-modal-button.secondary {
    background: #ff4444;
    color: #fff;
    padding: 0;
    min-width: 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.tile-modal-button.secondary:hover {
    background: #ff0000;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

/* Close button styles are now part of .tile-modal-button.secondary */

.close-tile-modal svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.close-tile-modal:hover svg {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .tile-modal-body {
        padding: 20px;
    }
    
    .tile-modal-title {
        font-size: 1.3rem;
        padding-right: 20px; /* Ensure title doesn't overlap with close button */
    }
    
    .tile-modal-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .tile-modal-button {
        width: 100%;
        height: 48px;
        border-radius: 50px; /* Slightly rounded corners for other buttons */
    }
    
    .tile-modal-button.primary {
        order: 1;
    }
    
    .tile-modal-button.secondary {
        order: 2;
        width: 44px;
        height: 44px;
        min-width: 44px;
        margin: 0 auto;
        border-radius: 50%;
    }
    
    .close-tile-modal {
        width: 44px;
        height: 44px;
        top: 10px;
        right: 10px;
    }
}
