/* Fixed Get $LOCKEDIN button */
.modal-trigger-btn {
    width: 4rem;
    height: 4rem;
    position: fixed;
    padding: 0;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    background: #000000d3;
    color: #000;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.2);
    transition: all 0.3s ease, background 1s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: 
        pulse 2s infinite,
        glow 3s ease-in-out infinite alternate;
}

.modal-trigger-btn img {
    width: 100%;
    z-index: 2;
}

.modal-trigger-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 255, 0, 0.8),
        inset 0 0 30px rgba(0, 255, 0, 0.3);
    animation-play-state: paused;
}

.modal-trigger-btn:active {
    transform: translateY(-2px) scale(1.05);
}

/* Keyframe Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes glow {
    0% {
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(0, 255, 0, 0.5),
            inset 0 0 20px rgba(0, 255, 0, 0.2);
    }
    100% {
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.3),
            0 0 30px rgba(0, 255, 0, 0.8),
            inset 0 0 30px rgba(0, 255, 0, 0.4);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 1rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #eee;
}

.modal-header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #333;
}

.close {
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 2rem;
}

/* Avatar Generator Styles */
.canvas-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.file-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    background: #333;
    color: white;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: bold;
    border-radius: 2rem;
}

.file-input-wrapper:hover {
    background: #1c1c1c;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.canvas-container {
    position: relative;
}

#canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 375px;
}

.controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.control-group {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    flex: 1;
    border-radius: 2rem;
    text-align: center;
    gap: 0.5rem;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.control-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.control-group input {
    padding: 8px;
    width: 70px;
    border: none;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
}

.control-group input:focus {
    outline: none;
    border-color: #333;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #333;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2rem;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.download-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#overlayFlip {
    background: #00cd22;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1em;
    flex: 2;
    min-width: 220px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

#overlayFlip:hover {
    background: #00991a;
}

@media screen and (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .control-group {
        width: 100%;
        min-width: auto;
    }
}
