@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Pacifico&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #00ffc6;
    --background: linear-gradient(135deg, #1a2332 0%, #2d3e50 100%);
    --surface: rgba(255, 255, 255, 0.08);
    --surface-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #b8e6f0;
    --border-color: rgba(0, 212, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(0, 212, 255, 0.25);
    --shadow: 0 8px 32px 0 rgba(0, 212, 255, 0.15);
    --shadow-lg: 0 8px 32px 0 rgba(0, 255, 198, 0.2);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--background);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 50px 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.15;
    z-index: 0;
}

header h1 {
    font-family: 'Pacifico', cursive;
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 400;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

header p {
    font-family: 'Pacifico', cursive;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.form-section,
.preview-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-section h2 {
    font-family: 'Pacifico', cursive;
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 25px;
    margin-top: 30px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}

.form-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.form-section h2:first-of-type {
    margin-top: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.25);
    transform: translateY(-2px);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'Pacifico', cursive;
    font-weight: 400;
}

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

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #001a2e;
    box-shadow: 0 4px 15px rgba(0, 255, 198, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 255, 198, 0.7);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-copy {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #001a2e;
    padding: 10px 20px;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.5);
}

.btn-copy:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.7);
}

.preview-section {
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--border-color);
}

.preview-header h2 {
    font-family: 'Pacifico', cursive;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

.preview-content {
    background: rgba(0, 20, 40, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: #e2f4f8;
    padding: 25px;
    border-radius: 16px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 400px;
}

.preview-content .placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
    font-family: 'Pacifico', cursive;
    font-size: 1.1rem;
}

footer {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    font-family: 'Pacifico', cursive;
}

/* Scrollbar Styling */
.preview-section::-webkit-scrollbar {
    width: 8px;
}

.preview-section::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.preview-section::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px;
}

.preview-section::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .preview-section {
        position: relative;
        top: 0;
        max-height: none;
    }

    header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 30px 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }

    .form-section,
    .preview-section {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 16px 28px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    animation: slideIn 0.3s ease;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}
