@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&display=swap');

body {
    background-color: #0d0d0d;
    color: #dcdcdc;
    font-family: 'Fira Code', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 15px;
    letter-spacing: 1px;
    color: #00ff99;
}

.info {
    text-align: center;
    font-size: 16px;
}

.container {
    width: 95%;
    max-width: 800px;
}

input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    font-size: 16px;
    background-color: #282a36;
    color: #dcdcdc;
    border: 1px solid #444;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input:focus {
    border-color: #00ff99;
    box-shadow: 0 0 7px rgba(0, 255, 204, 0.4);
}

.CodeMirror {
    border-radius: 8px;
    margin: 10px 0;
    background-color: #1f1f1f;
    text-align: left;
    font-size: 14px;
}
.CodeMirror .CodeMirror-scroll {
    padding: 10px;
    max-height: none;
}

@media screen and (max-width: 600px) {
    .CodeMirror {
        font-size: 12px !important;
    }
}

/* Buttons */
button {
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copyBtn {
    background-color: #008635;
    color: #fff;
    padding: 12px 18px;
}
.copyBtn:hover { background-color: #00692a; }
.copyBtn:active { background-color: #388e3c; }
.copyBtn:disabled { 
background: #e3e3e3;
        color: grey;
        cursor: not-allowed;
        opacity: 0.8;
    }

.clearBtn {
    background-color: #f44336;
    color: #fff;
    padding: 12px 18px;
    margin-left: 10px;
}
.clearBtn:hover { background-color: #d32f2f; }
.clearBtn:active { background-color: #c62828; }

#generateBtn {
    background-color: #f5f6f7;
    color: #333;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    max-width: 300px;
    width: 100%;
}
#generateBtn:hover { background-color: #e0e0e0; }
#generateBtn:active { background-color: #cfcfcf; transform: scale(0.98); }

.btn-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    display: none;
    z-index: 10000;
    min-width: 250px;
    color: #fff;
    overflow: hidden;
    border: 2px solid transparent;
}
.notification::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    width: 0;
    background: rgba(255,255,255,0.7);
    animation: loadBorder 2s linear forwards;
}
@keyframes loadBorder {
    0% { width: 0; }
    100% { width: 100%; }
}
.notification.success { background-color: #4caf50; border-color: #00ff91; }
.notification.invalid { background-color: #f44336; border-color: #ff7961; }

@media screen and (max-width: 600px) {
    h2 { font-size: 20px; }
    input { font-size: 14px; padding: 10px; }
    #generateBtn { font-size: 14px; padding: 10px; }
    .btn-container { flex-direction: row; justify-content: center; }
    .clearBtn { margin-left: 10px; margin-top: 0; }
}

.cm-s-dracula span.cm-variable {
    color: grey;
}