@import url('https://fonts.googleapis.com/css2?family=Indie+Flower&family=Shadows+Into+Light&family=Patrick+Hand&family=Caveat:wght@400;700&family=Kalam:wght@300;400;700&display=swap');

#text-to-handwriting-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.t2h-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.t2h-input-section h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

#t2h-input-text {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

#t2h-input-text:focus {
    outline: none;
    border-color: #3498db;
}

.t2h-controls {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.t2h-control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.t2h-control-group label {
    min-width: 130px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.t2h-control-group select,
.t2h-control-group input[type="range"],
.t2h-control-group input[type="color"] {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.t2h-control-group input[type="range"] {
    flex: 0.7;
}

.t2h-control-group input[type="color"] {
    width: 60px;
    height: 40px;
    cursor: pointer;
}

.t2h-control-group span {
    min-width: 50px;
    font-size: 14px;
    color: #666;
}

.t2h-button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.t2h-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.t2h-btn-primary {
    background: #3498db;
    color: white;
}

.t2h-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.t2h-btn-secondary {
    background: #2ecc71;
    color: white;
}

.t2h-btn-secondary:hover:not(:disabled) {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.t2h-btn-tertiary {
    background: #e74c3c;
    color: white;
}

.t2h-btn-tertiary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.t2h-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.t2h-output-section {
    display: flex;
    flex-direction: column;
}

#t2h-canvas-container {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    overflow: auto;
    background: #f8f9fa;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#t2h-canvas {
    display: block;
    max-width: 100%;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
    .t2h-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .t2h-button-group {
        flex-direction: column;
    }

    .t2h-btn {
        width: 100%;
    }

    .t2h-control-group {
        flex-wrap: wrap;
    }

    .t2h-control-group label {
        width: 100%;
        min-width: auto;
    }
}
