/* Cursive Text Generator Styles */

.cursive-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.cursive-card {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cursive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-border);
}

.cursive-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.text-input {
    font-size: 1.1rem;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    resize: vertical;
    font-family: 'Inter', sans-serif;
}

.text-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Font Styles Grid */
.font-styles-section {
    margin-bottom: 2rem;
}

.font-styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.font-styles-grid.hidden {
    display: none;
}

.font-style-btn {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.font-style-btn:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.font-style-btn.active {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.font-style-preview {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-style-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Controls Section */
.controls-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.form-range {
    flex: 1;
}

.font-size-value {
    min-width: 50px;
    text-align: center;
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.color-input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.form-control-color {
    width: 50px;
    height: 40px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* Preview Section */
.preview-section {
    margin-bottom: 2rem;
}

.preview-box {
    background: white;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    background-image: 
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-box:hover {
    border-color: var(--accent-primary);
}

.preview-box.has-background {
    background-image: none;
}

.preview-text {
    font-size: 2rem;
    text-align: center;
    word-wrap: break-word;
    max-width: 100%;
    transition: all 0.3s ease;
}

/* Output Section */
.output-section {
    margin-top: 2rem;
}

.output-box {
    position: relative;
}

.output-textarea {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #f9fafb;
    resize: vertical;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.output-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
    background: white;
}

/* Copy Button */
#copyBtn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

#copyBtn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

#copyBtn.copied {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

#copyBtn.copied::after {
    content: ' ✓';
    margin-left: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cursive-card {
        padding: 1.5rem;
    }
    
    .font-styles-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }
    
    .font-style-preview {
        font-size: 1.25rem;
    }
    
    .preview-text {
        font-size: 1.5rem;
    }
    
    .controls-section {
        padding: 1rem;
    }
}

/* Animation for text generation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-text {
    animation: fadeIn 0.3s ease;
}

