:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #4895ef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
    background: linear-gradient(90deg, var(--primary), var(--danger));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 45%;
}

.control-group h3 {
    font-size: 1.1rem;
    color: var(--dark);
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

input[type="color"],
input[type="range"],
select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

input[type="color"] {
    height: 40px;
    padding: 0.2rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #eee;
    padding-left: 2rem;
}

.button-preview {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s ease;
}

#generatedButton {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.code-container {
    width: 100%;
    background-color: #1e1e1e;
    color: #f8f8f2;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.code-tabs {
    display: flex;
    gap: 0.5rem;
}

.code-tab {
    padding: 0.3rem 0.8rem;
    background: #2d2d2d;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.code-tab.active {
    background: #3e3e3e;
    color: white;
}

.copy-btn {
    background: #3e3e3e;
    border: none;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #4e4e4e;
}

.code-content {
    overflow-x: auto;
}

pre {
    margin: 0;
    white-space: pre-wrap;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--dark);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .preview {
        border-left: none;
        border-top: 1px solid #eee;
        padding-left: 0;
        padding-top: 2rem;
    }
}

/* Animation for the button */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 1.5s infinite;
}