/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1c2526 0%, #2c3e50 100%);
    min-height: 100vh;
    padding: 20px;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #2a2a3c;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}

.input-section {
    padding: 40px;
    background: #1e1e2f;
    border-right: 1px solid #3a3a4c;
}

.preview-section {
    padding: 40px;
    background: #3a3a4c;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e0e0e0;
}

input[type="text"], input[type="number"], textarea, select {
    width: 100%;
    padding: 15px;
    border: 2px solid #3a3a4c;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: inherit;
    background: #2a2a3c;
    color: #e0e0e0;
}

textarea {
    height: 200px;
    resize: vertical;
    line-height: 1.4;
}

select {
    background: #2a2a3c;
    cursor: pointer;
    color: #e0e0e0;
}

input[type="text"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3470b8;
}

.font-info {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 5px;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover {
    background: linear-gradient(135deg, #2dc653 0%, #28a745 100%);
    transform: translateY(-2px);
}

.generate-btn:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #d3d3d3;
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.generate-btn .progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0s linear;
}

.generate-btn.loading .progress-bar {
    transition: width 3s linear; /* 3-second progress bar animation */
    width: 100%;
}

.generate-btn .btn-text {
    position: relative;
    z-index: 1;
}

.preview-card {
    width: 345px;
    height: 345px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    padding: 22px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.preview-card.light {
    background: white;
    border: 2px solid #e9ecef;
    color: #1e5084;
}

.preview-card.dark {
    background: linear-gradient(180deg, #191921 0%, #2A2A3C 100%);
    border: none;
    color: white;
}

.preview-header {
    text-align: right;
    margin-bottom: 8px;
    opacity: 0.95;
    font-weight: 500;
    min-height: 15px;
}

.preview-main {
    flex: 1;
    display: flex;
    align-items: center;
    line-height: 1.3;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.preview-footer {
    text-align: right;
    opacity: 0.95;
    margin-top: 8px;
    font-weight: 500;
    min-height: 12px;
}

.preview-card.light .preview-header,
.preview-card.light .preview-main,
.preview-card.light .preview-footer {
    color: #1e5084;
}

.preview-card.dark .preview-header,
.preview-card.dark .preview-main,
.preview-card.dark .preview-footer {
    color: white;
}

.red-line {
    height: 1.5px;
    background: #dc3232;
    width: calc(100% - 20px);
    margin: 0 10px;
}

.red-line.top {
    margin-bottom: 8px;
}

.red-line.bottom {
    margin-top: 8px;
}

.empty-preview {
    font-style: italic;
    font-weight: normal;
    font-size: 16px;
}

.empty-preview.light {
    color: rgba(30, 80, 132, 0.6);
}

.empty-preview.dark {
    color: rgba(255, 255, 255, 0.6);
}

.preview-text-content {
    width: 100%;
}

.preview-card.light .preview-text-content {
    color: #1e5084;
}

.preview-card.dark .preview-text-content {
    color: white;
}

.font-preview {
    font-size: 11px;
    color: #a0a0a0;
    font-style: italic;
    margin-top: 3px;
}

@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }
    
    .input-section {
        border-right: none;
        border-bottom: 1px solid #3a3a4c;
    }
    
    .preview-card {
        width: 100%;
        max-width: 350px;
    }
}

.font-preview-text {
    transition: font-family 0.3s ease, font-size 0.3s ease;
}