* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3f4f6 100%);
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content h2 {
    margin: 20px 0 10px;
    font-size: 1.75rem;
    font-weight: 700;
}

.loading-content p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.throbber {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* BETA Badge */
.beta-badge {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    z-index: 9999;
    animation: beta-pulse 2s ease-in-out infinite;
}

@keyframes beta-pulse {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
        transform: scale(1.05);
    }
}

/* Guest Warning Banner */
.guest-warning {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem auto;
    max-width: 1350px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.warning-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
}

.warning-content strong {
    color: #92400e;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
    display: inline;
}

.warning-content p {
    color: #78350f;
    margin: 0;
    line-height: 1.6;
}

.warning-content a {
    color: #c2410c;
    font-weight: 600;
    text-decoration: underline;
}

.warning-content a:hover {
    color: #9a3412;
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    color: #1e293b;
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
    text-align: center;
    font-weight: 700;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    border-radius: 2px;
}

.subtitle {
    text-align: center;
    color: #525252;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Edit Mode Header */
.edit-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin: -1rem -1rem 2rem -1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.edit-header h1 {
    color: white;
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
}

.edit-header .subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

h3 {
    color: #171717;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

h3:first-of-type {
    margin-top: 0;
}

/* Social Media Presets */
.social-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.preset-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Background Options & Photo Options - Now Dropdowns */
.option-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23525252' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.option-select:hover {
    border-color: #a3a3a3;
    background-color: #fafafa;
}

.option-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: white;
}

/* Form Select - Universal select styling */
select.form-select,
select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23525252' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select.form-select:hover,
select:hover {
    border-color: #a3a3a3;
    background-color: #fafafa;
}

select.form-select:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: white;
}

.premium-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-size: 0.7rem;
    border-radius: 12px;
    padding: 0.2rem 0.6rem;
    font-weight: bold;
}

#bgControls input {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

#bgControls input[type="color"] {
    height: 60px;
    padding: 0.5rem;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

#bgControls input[type="color"]:hover {
    border-color: #a3a3a3;
    transform: scale(1.01);
}

#bgControls input[type="color"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#bgControls input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 6px;
}

#bgControls input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

#bgControls input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 6px;
}

.bg-preview {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background: #6366f1;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    overflow: hidden;
    position: relative;
}

.bg-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.bg-preview.matrix {
    background:
        radial-gradient(120vw 120vh at 50% 55%, rgba(30, 90, 160, .26), transparent 60%),
        radial-gradient(80vw 60vh at 60% 30%, rgba(30, 120, 200, .16), transparent 55%),
        linear-gradient(#0000, #0004),
        #07101c;
    background-color: #03060b;
    position: relative;
    overflow: hidden;
}

.bg-preview.matrix .matrix-column {
    position: absolute;
    font-family: monospace;
    font-size: 10px;
    color: #34e0ff;
    white-space: pre;
    line-height: 12px;
    pointer-events: none;
    animation: matrixFall 4s linear infinite;
}

.bg-preview.matrix .matrix-column:nth-child(1) {
    left: 15%;
    animation-delay: 0s;
}

.bg-preview.matrix .matrix-column:nth-child(2) {
    left: 45%;
    animation-delay: -1.5s;
}

.bg-preview.matrix .matrix-column:nth-child(3) {
    left: 75%;
    animation-delay: -3s;
}

.bg-preview.gradient-wave {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 400% 400%;
    animation: gradientWave 15s ease infinite;
}

.bg-preview.particle-stars {
    background: linear-gradient(to bottom, #000428, #004e92);
    position: relative;
    overflow: hidden;
}

@keyframes matrixFall {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    5% {
        opacity: 1;
        text-shadow: 0 0 10px #0F9, 0 0 20px #0F9;
    }

    10% {
        text-shadow: 0 0 8px #0F9, 0 0 15px #0F9;
    }

    85% {
        opacity: 0.6;
        text-shadow: 0 0 5px #0F9;
    }

    100% {
        transform: translateY(150%);
        opacity: 0;
        text-shadow: none;
    }
}

/* Links Form */
.link-input {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr auto;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    max-width: 100%;
}

.link-input input {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 0;
    width: 100%;
    min-height: 48px;
}

.link-input input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.link-input .remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.link-input .remove:hover {
    background: #dc2626;
}

#addLinkBtn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1.125rem 1.75rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.2s;
    position: relative;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#addLinkBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

#addLinkBtn:active {
    transform: scale(0.98);
}

#addCommonBtn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#addCommonBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#addCommonBtn::after {
    content: '▼';
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.common-links-wrapper.show #addCommonBtn::after {
    transform: rotate(180deg);
}

/* Output */
.instructions {
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

#output {
    width: 100%;
    font-family: 'Monaco', 'Menlo', monospace;
    background: #1f2937;
    color: #e5e7eb;
    border: none;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
}

#copyBtn {
    background: linear-gradient(135deg, #6366f1, #4338ca);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
}

#copyBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Instructions */
.instructions-box {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.instructions-box ol {
    margin: 0;
    padding-left: 1.5rem;
}

.instructions-box li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.instructions-box p {
    margin-top: 1rem;
    margin-bottom: 0;
    color: #0369a1;
    font-weight: 600;
}

/* Profile Section */
.profile-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-input-group {
    margin-bottom: 1.5rem;
}

.profile-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.profile-input-group input[type="text"],
.profile-input-group input[type="url"],
.profile-input-group input[type="file"] {
    width: 100%;
    padding: 1rem 1.125rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.0625rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    min-height: 48px;
}

.profile-input-group input[type="text"]:focus,
.profile-input-group input[type="url"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Input Validation States */
.profile-input-group input.valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310b981'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px 20px;
    padding-right: 2.75rem;
}

.profile-input-group input.invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ef4444'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px 20px;
    padding-right: 2.75rem;
}

.profile-input-group input.warning {
    border-color: #f59e0b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23f59e0b'%3E%3Cpath fill-rule='evenodd' d='M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px 20px;
    padding-right: 2.75rem;
}

.validation-message {
    display: none;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.validation-message.show {
    display: block;
}

.validation-message.success {
    color: #047857;
    background: #d1fae5;
    border: 1px solid #10b981;
}

.validation-message.error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #ef4444;
}

.validation-message.warning {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #f59e0b;
}

/* Link Item Input Validation */
.link-item input[type="url"].valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310b981'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 18px 18px;
    padding-right: 2.5rem;
}

.link-item input[type="url"].invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ef4444'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 18px 18px;
    padding-right: 2.5rem;
}

.link-item input[type="url"].warning {
    border-color: #f59e0b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23f59e0b'%3E%3Cpath fill-rule='evenodd' d='M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 18px 18px;
    padding-right: 2.5rem;
}

/* Form Group - Modern form layout */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: inline-block;
    margin-bottom: 0.5rem;
    margin-right: 0.75rem;
    font-weight: 600;
    color: #171717;
    font-size: 0.95rem;
    vertical-align: middle;
}

.form-group.inline-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-group.inline-label label {
    margin-bottom: 0;
    flex-shrink: 0;
    min-width: 120px;
}

.form-group.inline-label select {
    flex: 1;
}

.inline-label-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inline-label-wrapper label {
    flex-shrink: 0;
    min-width: 120px;
    margin-bottom: 0;
}

.inline-label-wrapper select {
    flex: 1;
}

.form-input {
    width: 100%;
    padding: 1rem 1.125rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1.0625rem;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
    min-height: 48px;
}

.form-input:hover {
    border-color: #d4d4d4;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-input::placeholder {
    color: #a3a3a3;
}

/* Color Input Wrapper with Swatch */
.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem;
    background: white;
    transition: all 0.2s;
}

.color-input-wrapper:hover {
    border-color: #d4d4d4;
}

.color-input-wrapper:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.color-picker {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.color-swatch {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.color-text {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    color: #374151;
    font-weight: 500;
    min-width: 0;
}

/* Photo options now uses .option-select - styles defined above */

/* Unified Live Preview */
/* Preview Controls */
.preview-controls {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    order: 1;
    width: 100%;
}

.preview-controls h4 {
    display: none;
}

/* Live preview below controls */
.live-preview {
    order: 2;
    min-height: 0;
    align-self: center;
}

.preview-toggle {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    background: #f5f5f5;
    padding: 0.25rem;
    border-radius: 8px;
    flex: 0 0 auto;
}

.preview-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0;
    color: #737373;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-toggle-btn svg {
    width: 24px;
    height: 24px;
}

.preview-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #171717;
}

.preview-toggle-btn.active {
    background: white;
    color: #2563eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.live-preview {
    max-width: 100%;
    margin: 0 auto;
    background: #6366f1;
    border-radius: 16px;
    padding: 3rem 2rem;
    min-height: 0;
    /* flex: 1; */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* Preview content wrapper styles removed - now handled inline in iframe */

.live-preview.desktop .preview-link {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
}

.live-preview.mobile {
    width: 375px !important;
    max-width: 375px;
    height: 667px !important;
    max-height: calc(100dvh - 100px);
    padding: 0;
    border: 8px solid #1e293b !important;
    border-radius: 32px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    overflow: hidden;
}

.live-preview.mobile h4 {
    top: 1.2rem;
}

.live-preview.mobile::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 10;
}

/* Tablet Preview */
.live-preview.tablet {
    width: 480px !important;
    max-width: 480px;
    height: 640px !important;
    max-height: calc(100dvh - 100px);
    padding: 0;
    border: 12px solid #1e293b !important;
    border-radius: 36px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3), inset 0 0 0 2px rgba(255, 255, 255, 0.1) !important;
    overflow: hidden;
}

.live-preview.tablet h4 {
    top: 1.5rem;
}

.live-preview.tablet::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    z-index: 10;
}

/* Desktop Preview - Wide Monitor (16:9 aspect ratio) */
.live-preview.desktop {
    width: 100%;
    max-width: 900px;
    height: 350px !important;
    padding: 0;
    border: 12px solid #1e293b !important;
    border-bottom: 35px solid #1e293b !important;
    border-radius: 12px 12px 8px 8px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.05) !important;
    position: relative;
    overflow: hidden;
}

.live-preview.desktop::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 20px;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    box-shadow: 20px 0 0 rgba(255, 255, 255, 0.2), 40px 0 0 rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.live-preview.desktop::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 30px;
    background: #0f172a;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.live-preview.desktop h4 {
    top: 1.75rem;
}

.live-preview h4 {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preview-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 1;
}

.preview-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.preview-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-name {
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.preview-subtitle {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    text-align: center;
    margin-top: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.preview-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1;
}

.preview-link {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.preview-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.preview-placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

/* Social Icons */
.preview-social-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-social-link::before {
    font-family: 'Font Awesome 6 Brands', Arial, sans-serif;
    font-size: 1.5rem;
}

/* Platform-specific icons using FontAwesome Unicode */
.preview-social-link[data-platform="github"]::before {
    content: "\f09b";
}

.preview-social-link[data-platform="linkedin"]::before {
    content: "\f0e1";
}

.preview-social-link[data-platform="facebook"]::before {
    content: "\f39e";
}

.preview-social-link[data-platform="instagram"]::before {
    content: "\f16d";
}

.preview-social-link[data-platform="twitter"]::before {
    content: "\f099";
}

.preview-social-link[data-platform="whatsapp"]::before {
    content: "\f232";
}

.preview-social-link[data-platform="youtube"]::before {
    content: "\f167";
}

.preview-social-link[data-platform="tiktok"]::before {
    content: "\e07b";
}

.preview-social-link[data-platform="custom"]::before {
    content: "\f0c1";
}

/* Icon style variations */
.preview-social-link[data-icon-style="monochrome"]::before {
    filter: grayscale(100%);
}

.preview-social-link[data-icon-style="emphasized"]::before {
    text-shadow: 0 0 10px currentColor;
    font-weight: bold;
}

/* Custom icon - hide ::before when img is present */
.preview-social-link:has(img)::before {
    display: none;
}

/* Matrix effect for live preview */
.live-preview.matrix {
    background:
        radial-gradient(120vw 120vh at 50% 55%, rgba(30, 90, 160, .26), transparent 60%),
        radial-gradient(80vw 60vh at 60% 30%, rgba(30, 120, 200, .16), transparent 55%),
        linear-gradient(#0000, #0004),
        #07101c !important;
    background-color: #03060b;
}

/* Gradient Wave effect for live preview */
.live-preview.gradient-wave {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 400% 400%;
    animation: gradientWave 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.live-preview.gradient-wave::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 50%, rgba(99, 102, 241, 0.3) 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    pointer-events: none;
}

.live-preview.gradient-wave::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gradientWave {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Particle Stars effect for live preview */
.live-preview.particle-stars {
    background: linear-gradient(to bottom, #000428, #004e92);
    position: relative;
    overflow: hidden;
}

.star-particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    animation: twinkle 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.star-particle.small {
    width: 2px;
    height: 2px;
}

.star-particle.medium {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.star-particle.large {
    width: 4px;
    height: 4px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 1);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes shootingStar {
    0% {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateX(var(--shoot-x, -300px)) translateY(var(--shoot-y, 300px));
        opacity: 0;
    }
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8),
        0 0 20px 4px rgba(135, 206, 235, 0.5);
    animation: shootingStar 2s linear;
    pointer-events: none;
    z-index: 0;
    --shoot-x: -300px;
    --shoot-y: 300px;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
    transform-origin: left center;
    transform: rotate(-45deg);
}

/* Geometric Patterns effect for live preview */
.live-preview.geometric {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

/* Neon Pulse effect for live preview */
.live-preview.flower-power {
    background: linear-gradient(135deg, #ff9a56, #ff6b9d, #c06c84);
    position: relative;
    overflow: hidden;
}

.live-preview.flower-power > * {
    position: relative;
    z-index: 2;
}

.live-preview.flower-power::before {
    content: '🌼';
    position: absolute;
    top: 20%;
    left: 15%;
    font-size: 3rem;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    animation: flowerGrow 6s ease-in-out infinite;
}

.live-preview.flower-power::after {
    content: '🌸';
    position: absolute;
    bottom: 25%;
    right: 20%;
    font-size: 2.8rem;
    pointer-events: none;
    z-index: 1;
    opacity: 0.5;
    animation: flowerSway 8s ease-in-out infinite 1s;
}

/* Aurora Wave effect for live preview */
.live-preview.aurora-wave {
    background: #000;
    position: relative;
    overflow: hidden;
}

.live-preview.aurora-wave::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(0, 255, 150, 0.4) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 150, 255, 0.4) 0%, transparent 40%),
        radial-gradient(ellipse at 40% 70%, rgba(150, 0, 255, 0.4) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 0, 150, 0.4) 0%, transparent 40%);
    animation: auroraWave 8s ease-in-out infinite;
    z-index: 0;
}

.geometric-shape {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
    z-index: 0;
}

.geometric-shape.circle {
    border-radius: 50%;
    animation: floatRotate 20s ease-in-out infinite;
}

.geometric-shape.square {
    animation: floatRotate 25s ease-in-out infinite reverse;
}

.geometric-shape.triangle {
    width: 0;
    height: 0;
    border: none;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(255, 255, 255, 0.15);
    animation: floatRotate 30s ease-in-out infinite;
}

.geometric-shape.hexagon {
    width: 80px;
    height: 46px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    border: none;
    animation: floatRotate 22s ease-in-out infinite;
}

.geometric-shape.hexagon::before,
.geometric-shape.hexagon::after {
    content: '';
    position: absolute;
    width: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    left: 0;
}

.geometric-shape.hexagon::before {
    bottom: 100%;
    border-bottom: 23px solid rgba(255, 255, 255, 0.15);
}

.geometric-shape.hexagon::after {
    top: 100%;
    border-top: 23px solid rgba(255, 255, 255, 0.15);
}

@keyframes floatRotate {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.15;
    }

    25% {
        transform: translate(30px, -30px) rotate(90deg) scale(1.1);
        opacity: 0.25;
    }

    50% {
        transform: translate(0, -60px) rotate(180deg) scale(1);
        opacity: 0.15;
    }

    75% {
        transform: translate(-30px, -30px) rotate(270deg) scale(0.9);
        opacity: 0.2;
    }
}

.bg-preview.geometric {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

.bg-preview.flower-power {
    background: linear-gradient(135deg, #ff9a56, #ff6b9d, #c06c84);
    position: relative;
    overflow: hidden;
}

.bg-preview.flower-power::before {
    content: '🌼 🌸 🌺 🌻';
    position: absolute;
    inset: 0;
    font-size: 2rem;
    pointer-events: none;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    justify-items: center;
    gap: 1rem;
    padding: 1rem;
}

.bg-preview.flower-power::after {
    content: '';
    display: none;
}

.bg-preview.aurora-wave {
    background: #000;
    position: relative;
    overflow: hidden;
}

.bg-preview.aurora-wave::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(0, 255, 150, 0.4) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 150, 255, 0.4) 0%, transparent 40%),
        radial-gradient(ellipse at 40% 70%, rgba(150, 0, 255, 0.4) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 0, 150, 0.4) 0%, transparent 40%);
    animation: auroraWave 8s ease-in-out infinite;
}

@keyframes flowerGrow {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes flowerSway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
}

@keyframes auroraWave {

    0%,
    100% {
        transform: translate(0%, 0%) rotate(0deg);
    }

    50% {
        transform: translate(20%, 20%) rotate(180deg);
    }
}

.live-preview.matrix .matrix-column {
    position: absolute;
    font-family: monospace;
    font-size: 14px;
    color: #0F9;
    white-space: pre;
    line-height: 16px;
    pointer-events: none;
    animation: matrixFall 5s linear infinite;
    z-index: 0;
    text-shadow: 0 0 5px #0F9, 0 0 10px #0F9;
    opacity: 0.9;
}

.live-preview.matrix .matrix-column:nth-child(1) {
    left: 10%;
    animation-delay: -2s;
}

.live-preview.matrix .matrix-column:nth-child(2) {
    left: 30%;
    animation-delay: 0s;
}

.live-preview.matrix .matrix-column:nth-child(3) {
    left: 50%;
    animation-delay: -3.5s;
}

.live-preview.matrix .matrix-column:nth-child(4) {
    left: 70%;
    animation-delay: -1.5s;
}

.live-preview.matrix .matrix-column:nth-child(5) {
    left: 90%;
    animation-delay: -4s;
}

/* Old separate previews - kept for compatibility but hidden */
.profile-preview {
    display: none;
}

.bg-preview {
    display: none;
}

/* Advanced Styling Section */
.advanced-styling-section {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.advanced-styling-section h3 {
    margin: 0 0 1rem 0;
    user-select: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: white !important;
}

.advanced-styling-section h3:hover {
    opacity: 0.9;
}

#advancedToggleIcon {
    display: inline-block;
    transition: transform 0.3s ease;
}

#advancedToggleIcon.open {
    transform: rotate(90deg);
}

.styling-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.styling-option {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.styling-option label {
    font-weight: 500;
    font-size: 0.9rem;
}

.styling-option input[type="color"] {
    width: 100%;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}

.styling-option input[type="color"]:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.styling-option input[type="color"]:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

.styling-option input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 4px;
    border: none;
}

.styling-option input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.styling-option input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 4px;
}

.styling-option .option-select {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.reset-styling-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reset-styling-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

/* Links Section */
/* Unified Link Buttons */
.link-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.link-buttons button {
    width: 100%;
}

.common-links-wrapper {
    position: relative;
    width: 100%;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    width: 100%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1;
    border: 2px solid #e2e8f0;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

.dropdown-content a {
    color: #374151;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    font-weight: 500;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
}

.dropdown-content a:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.dropdown-content a:last-child {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    border-bottom: none;
}

.common-links-wrapper.show .dropdown-content {
    display: block;
}

/* Premium Background Dropdown */
.premium-dropdown {
    margin-top: 1rem;
}

.premium-dropdown select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23525252' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.premium-dropdown select:hover {
    border-color: #a3a3a3;
    background-color: #fafafa;
}

.premium-dropdown select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: white;
}

/* Premium Effect Options */
.premium-options {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.premium-options h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.option-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.option-group .form-select,
.option-group .form-input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.option-group .form-select:focus,
.option-group .form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.option-group input[type="color"] {
    height: 38px;
    cursor: pointer;
}

/* Hosting Options */
.hosting-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hosting-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.hosting-option:hover {
    border-color: #6366f1;
    background: #f9fafb;
}

.hosting-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hosting-option.disabled:hover {
    border-color: #e5e7eb;
    background: white;
}

.hosting-option input[type="radio"] {
    margin-top: 0.25rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.hosting-option label {
    flex: 1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hosting-option label strong {
    color: #374151;
    font-size: 1.1rem;
}

.hosting-option label span {
    color: #6b7280;
    font-size: 0.9rem;
}

.hosting-option label a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}

.hosting-option label a:hover {
    text-decoration: underline;
}

.hosting-option input[type="radio"]:checked~label {
    color: #6366f1;
}

/* Hosting Options Card */
.hosting-options-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
    border: 2px solid #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.hosting-options-card h3 {
    margin-top: 0;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hosting-section {
    margin-bottom: 1rem;
}

.hosting-hint {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #92400e;
}

.hosting-hint a {
    color: #d97706;
    font-weight: 600;
    text-decoration: none;
}

.hosting-hint a:hover {
    text-decoration: underline;
}

.url-slug-section {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    border: 2px solid #f59e0b;
}

.url-slug-section label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.url-input-group {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.url-prefix {
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 500;
    border-right: 2px solid #e5e7eb;
}

.url-input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.url-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.slug-availability {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slug-availability.available {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.slug-availability.taken {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.slug-availability.checking {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.slug-availability::before {
    font-size: 1.25rem;
}

.slug-availability.available::before {
    content: '✓';
}

.slug-availability.taken::before {
    content: '✗';
}

.slug-availability.checking::before {
    content: '⏳';
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 2rem 0;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* Edit Mode Actions */
.edit-actions {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    border: 2px solid #0ea5e9;
}

.view-live-btn {
    display: block;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    box-sizing: border-box;
}

.view-live-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.danger-zone {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #f87171;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.15);
}

.danger-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.toggle-status-btn,
.delete-btn {
    padding: 1rem;
    border: 2px solid;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.toggle-status-btn::before,
.delete-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

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

.toggle-status-btn {
    border-color: #f59e0b;
    color: #b45309;
}

.toggle-status-btn::before {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.toggle-status-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.toggle-status-btn:hover::before {
    opacity: 1;
}

.toggle-status-btn.dev-mode {
    border-color: #10b981;
    color: #065f46;
}

.toggle-status-btn.dev-mode::before {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.toggle-status-btn.dev-mode:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.delete-btn {
    border-color: #dc2626;
    color: #991b1b;
}

.delete-btn::before {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.delete-btn:hover::before {
    opacity: 1;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.help-icon:hover,
.help-icon.active {
    background: rgba(0, 0, 0, 0.25);
    transform: scale(1.15);
}

.help-icon::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: normal;
    max-width: 250px;
    min-width: 180px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: normal;
    line-height: 1.4;
}

.help-icon:hover::after,
.help-icon.active::after {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.help-icon::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.help-icon:hover::before,
.help-icon.active::before {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* Hosted Success */
.hosted-success {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid #10b981;
    text-align: center;
}

.hosted-success h3 {
    color: #10b981;
    margin-top: 0;
}

.live-url-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.url-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.url-display a {
    color: #6366f1;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
}

.url-display a:hover {
    text-decoration: underline;
}

.copy-url-btn {
    padding: 0.5rem 1rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.copy-url-btn:hover {
    background: #4f46e5;
}

.manage-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.edit-btn,
.view-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-btn {
    background: #6366f1;
    color: white;
}

.edit-btn:hover {
    background: #4f46e5;
}

.view-btn {
    background: #e5e7eb;
    color: #374151;
}

.view-btn:hover {
    background: #d1d5db;
}

/* Export Section */
.export-section {
    background: #f0f9ff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid #0ea5e9;
}

.export-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.export-btn {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.html-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.download-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.embed-btn {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.output-container {
    margin-top: 2rem;
}

/* Help Dialog */
.help-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.3s;
    z-index: 999;
}

.help-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.dialog-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.dialog-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.dialog-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.dialog-close:hover {
    background: #e5e7eb;
    color: #374151;
    transform: scale(1.1);
}

.dialog-content h3 {
    margin-top: 0;
    color: #6366f1;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.dialog-content h4 {
    color: #1e293b;
    font-size: 1.125rem;
    margin: 0 0 0.75rem 0;
}

.help-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #6366f1;
}

.help-section ul {
    margin: 0;
    padding-left: 1.5rem;
}

.help-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.dialog-content ol {
    padding-left: 1.5rem;
}

.dialog-content li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.dialog-content strong {
    color: #374151;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        margin: 1rem 0.75rem;
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .editor-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .preview-column {
        position: relative;
        top: 0;
        width: 100%;
        order: -1;
    }

    .edit-header {
        margin: -0.5rem -0.5rem 1.5rem -0.5rem;
        padding: 1.25rem;
    }

    .edit-header h1 {
        font-size: 1.75rem;
    }

    .live-preview {
        position: relative;
        top: 0;
        padding: 2rem 1.5rem;
    }

    .preview-avatar {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }

    .preview-name {
        font-size: 1.125rem;
    }

    .link-input {
        grid-template-columns: 1fr;
        gap: 0.625rem;
        padding: 1.25rem 1rem;
    }

    .link-input input {
        padding: 1rem 1.125rem;
        font-size: 1rem;
    }

    .link-input .remove {
        padding: 1rem;
        min-height: 48px;
    }

    #addLinkBtn {
        width: 100%;
        padding: 1.25rem 1.5rem;
        font-size: 1.125rem;
    }

    .form-input {
        padding: 1.125rem 1.25rem;
        font-size: 1.0625rem;
    }

    .social-presets {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .export-buttons {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .link-buttons {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .link-buttons button {
        min-height: 52px;
        padding: 1.125rem 1.5rem;
        font-size: 1.0625rem;
    }

    .danger-actions {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .hosting-options-card,
    .edit-actions,
    .advanced-styling-section {
        padding: 1.5rem 1.25rem;
    }

    .section-header {
        padding: 1.25rem 1rem;
        gap: 1rem;
    }

    .help-button {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 56px;
        height: 56px;
        font-size: 1.375rem;
    }

    .dialog-content {
        width: 95%;
        max-width: 95%;
        padding: 1.75rem 1.5rem;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        margin-top: 0.5rem;
        border-radius: 8px;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .header-actions button {
        width: 100%;
        min-height: 48px;
        padding: 1rem 1.25rem;
        justify-content: center;
    }

    .beta-badge {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    font-weight: 600;
    font-size: 1rem;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out, slideOut 0.3s ease-in 2.7s forwards;
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.toast-icon {
    font-size: 1.5rem;
}

@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;
    }
}

/* ==============================================
   REORGANIZED PROFESSIONAL LAYOUT - NEW STYLES
   ============================================== */

/* Colorful background gradient */
body {
    background: linear-gradient(135deg, #dbeafe 0%, #f3e8ff 50%, #fce7f3 100%) !important;
    background-attachment: fixed !important;
}

/* Two Column Layout - Desktop Only (>1024px) */
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 2rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

}

/* Force grid layout on large screens */
@media (min-width: 1025px) {
    .editor-layout {
        display: grid !important;
        grid-template-columns: 1fr 500px !important;
    }
}

.editor-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
}

.preview-column {
    position: sticky;
    top: 1rem;
    min-width: 0;
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    grid-column: 2;
    grid-row: 1;
}

/* Mobile floating preview button */
.mobile-preview-trigger {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    z-index: 9998;
    border: 2px solid white;
    padding: 8px;
    transition: all 0.3s ease;
}

.mobile-preview-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

.mobile-preview-trigger .preview-mini {
    border-radius: 6px;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    transform-origin: top left;
    transform: scale(0.145);
    width: 400px;
    height: 550px;
    pointer-events: none;
    padding-top: 8px;
}

.mobile-preview-trigger .preview-mini h4 {
    display: none !important;
}

.mobile-preview-trigger .preview-mini .preview-profile {
    transform: scale(0.8);
}

.mobile-preview-trigger .preview-mini .preview-link {
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
}

.mobile-preview-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
}

.mobile-preview-overlay.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-preview-overlay .live-preview {
    position: relative;
    /* No default background - let premium backgrounds show through */
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Default white background only for non-premium backgrounds */
.mobile-preview-overlay .live-preview:not(.matrix):not(.gradient-wave):not(.particle-stars):not(.geometric):not(.flower-power):not(.aurora-wave) {
    background: white;
}

.mobile-preview-overlay .live-preview h4 {
    display: none !important;
}

/* Premium backgrounds inherit their styles from main .live-preview classes */

.preview-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    flex-wrap: nowrap;
    justify-content: center;
    max-width: 95vw;
    justify-content: center;
}

.preview-toolbar button {
    padding: 0.5rem 0.75rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.preview-toolbar button.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.preview-close {
    margin-left: auto;
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

.preview-disclaimer {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #92400e;
    line-height: 1.5;
}

.preview-disclaimer svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #f59e0b;
}

.preview-disclaimer strong {
    font-weight: 600;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: .5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border-left: 4px solid #6366f1;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
}

.section-header:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.section-number {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.section-info {
    flex: 1;
}

.section-info h2 {
    margin: 0 0 0.25rem 0;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
}

.section-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.section-toggle {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: #6366f1;
    transition: transform 0.3s ease;
    font-weight: bold;
}

.section-toggle.rotated {
    transform: rotate(-90deg);
}

.section-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Reorganized Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e5e5;
    transition: all 0.2s ease;
}

.card-header:hover {
    background-color: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
}

.card-header h3 {
    margin: 0 !important;
    color: #171717;
    font-size: 1.25rem;
    flex: 1;
}

.card-toggle {
    font-size: 1rem;
    color: #6366f1;
    font-weight: bold;
    transition: transform 0.2s ease;
    user-select: none;
    padding: 0 0.5rem;
}

.card-content {
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    max-height: 5000px;
    opacity: 1;
    overflow: hidden;
}

.card-content[style*="display: none"] {
    max-height: 0;
    opacity: 0;
    padding: 0;
}

/* Icon System - CSS-based icons using ::before */
[data-icon]::before {
    content: '';
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    margin-right: 0.5rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

[data-icon="user"]::before {
    content: '●';
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: transparent;
    position: relative;
    top: -0.1em;
}

[data-icon="palette"]::before {
    content: '▪';
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-radius: 3px;
    background: linear-gradient(135deg, currentColor 0%, transparent 50%, currentColor 100%);
}

[data-icon="link"]::before {
    content: '⚯';
    font-size: 1.2em;
    font-weight: bold;
    width: auto;
    height: auto;
    border: none;
    background: none;
}

[data-icon="globe"]::before {
    content: '◉';
    font-size: 1.2em;
    width: auto;
    height: auto;
    border: none;
    background: none;
}

[data-icon="warning"]::before {
    content: '⚠';
    font-size: 1.2em;
    width: auto;
    height: auto;
    border: none;
    background: none;
    color: #dc2626;
}

[data-icon="image"]::before {
    content: '🖼';
    font-size: 1em;
    width: auto;
    height: auto;
    border: none;
    background: none;
}

[data-icon="paint-brush"]::before {
    content: '🎨';
    font-size: 1em;
    width: auto;
    height: auto;
    border: none;
    background: none;
}

[data-icon="settings"]::before {
    content: '⚙';
    font-size: 1.2em;
    width: auto;
    height: auto;
    border: none;
    background: none;
}

[data-icon="sliders"]::before {
    content: '⫴';
    font-size: 1.2em;
    width: auto;
    height: auto;
    border: none;
    background: none;
    font-weight: bold;
}

/* Character Counter */
.char-counter {
    float: right;
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: normal;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.danger {
    color: #ef4444;
}

/* History Controls (Undo/Redo) */
.history-controls {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
    flex: 0 0 auto;
}

.btn-history {
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-width: 44px;
}

.btn-history svg {
    width: 20px;
    height: 20px;
}

.btn-history:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-history:disabled {
    background: rgba(107, 114, 128, 0.5);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Preview Mode Toggle */
.preview-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.mode-btn {
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-btn:hover {
    background: white;
    transform: scale(1.05);
}

.mode-btn.active {
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Template Button */
.btn-templates {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.btn-templates:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-import {
    padding: 0.75rem 1.5rem;
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid rgba(16, 185, 129, 0.3);
    color: white;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.btn-import:hover {
    background: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.header-actions {
    margin-top: 1.5rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3), 0 0 80px rgba(240, 147, 251, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: headerShine 8s linear infinite;
}

@keyframes headerShine {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.header-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.gradient-title {
    margin: 0 0 0.75rem 0 !important;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center !important;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.page-header .subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    text-align: center !important;
    font-size: 1.15rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .gradient-title {
        font-size: 2rem;
    }

    .page-header {
        padding: 2rem 1.5rem;
    }
}

/* Compact Link Items */
.link-item {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(200px, 2fr) 40px;
    gap: 0.75rem;
    align-items: start;
}

@media (max-width: 768px) {
    .link-item {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .link-item-inputs {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .link-item-inputs input {
        width: 100%;
    }
    
    .link-item-actions {
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }
    
    .link-scheduling {
        width: 100%;
    }
}

.link-item:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.link-item:focus-within {
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.link-item-inputs {
    display: contents;
}

.link-item-inputs input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    font-size: 0.875rem;
}

.link-item-inputs input.title {
    grid-column: 1;
}

.link-item-inputs input.url {
    grid-column: 2;
}

.link-item-actions {
    grid-column: 3;
    display: flex;
    gap: 0.5rem;
    align-items: start;
}

.link-scheduling {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .link-scheduling .schedule-dates {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
}

/* Legacy support - hide old structure elements */
.link-item-header {
    display: none;
}

.link-item-url {
    display: none;
}

/* Social Links List */
.social-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.social-link-item {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s;
}

.social-link-item:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.social-link-main {
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
}

.icon-options-panel {
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.icon-style-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.icon-style-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.icon-style-btn:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.icon-style-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.custom-icon-url {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    font-size: 0.875rem;
}

.social-link-item select,
.social-link-item input {
    padding: 0.625rem 0.75rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    font-size: 0.875rem;
}

.social-link-item select {
    background: white;
}

.btn-icon {
    padding: 0.5rem;
    background: white;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    flex-shrink: 0;
}

.btn-icon:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-warning {
    background: white;
    color: #f59e0b;
    border: 2px solid #f59e0b;
}

.btn-warning:hover {
    background: #f59e0b;
    color: white;
}

.btn-danger {
    background: white;
    color: #ef4444;
    border: 2px solid #ef4444;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-secondary {
    background: #e5e5e5;
    color: #262626;
}

.btn-secondary:hover {
    background: #d4d4d4;
}

/* Button Loading States */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Action Bar */
.action-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
}

/* Danger Zone */
/* Dev Mode Toggle Button */
.dev-mode-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: 2px solid;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 1rem;
}

.dev-mode-toggle.live-mode {
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    border-color: #22c55e;
    color: #166534;
}

.dev-mode-toggle.live-mode:hover {
    background: linear-gradient(135deg, #bbf7d0 0%, #a7f3d0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.dev-mode-toggle.dev-mode {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #92400e;
}

.dev-mode-toggle.dev-mode:hover {
    background: linear-gradient(135deg, #fde047 0%, #fcd34d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-badge.live {
    background: #16a34a;
    color: white;
}

.status-badge.dev {
    background: #d97706;
    color: white;
}

.toggle-text {
    flex: 1;
    text-align: left;
}

/* Collapsible Card Styles */
.collapsible-card .card-header {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.collapsible-card .card-header:hover {
    background: #f9fafb;
    border-radius: 8px;
}

.collapse-icon {
    position: absolute;
    right: 0;
    font-size: 1.2rem;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.collapse-icon.rotated {
    transform: rotate(-90deg);
}

.collapsible-content {
    transition: all 0.3s ease;
}

/* Dev Mode Card */
.dev-mode-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid #6366f1;
}

.dev-mode-info p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: #475569;
}

.dev-mode-info p:first-child {
    margin-top: 0;
}

.dev-mode-info p:last-child {
    margin-bottom: 0;
}

.mode-description {
    color: #64748b !important;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-badge.live {
    background: #dcfce7;
    color: #15803d;
}

.status-badge.dev {
    background: #fef3c7;
    color: #a16207;
}

/* Action Buttons */
.btn-large {
    font-size: 1.125rem;
    padding: 1rem 1.5rem;
    font-weight: 700;
}

/* Templates Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.modal-header h2 {
    margin: 0;
    color: #1f2937;
}

.modal-close {
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #1f2937;
}

.modal-subtitle {
    color: #6b7280;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
}

.template-card {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
}

.template-card-hidden {
    display: none;
}

/* 60-Second Timer Widget */
.timer-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.timer-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.5);
}

.timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
}

.timer-challenge {
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timer-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s;
}

.timer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#analogClock {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timer-digital {
    color: white;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.timer-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.timer-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.timer-button:active {
    transform: scale(0.98);
}

.timer-widget.running .timer-button {
    background: #ff6b6b;
    color: white;
}

.timer-widget.completed .timer-button {
    background: #51cf66;
    color: white;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-20px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-10px); }
}

@media (max-width: 768px) {
    .timer-widget {
        bottom: 80px;
        right: 10px;
        padding: 15px;
        transform: scale(0.85);
    }
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.template-card:hover {
    border-color: #6366f1;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.template-card:hover::before {
    opacity: 1;
}

.template-card:active {
    transform: translateY(-4px) scale(1.01);
    transition: all 0.1s ease;
}

.template-preview {
    height: 220px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

@media (max-width: 480px) {
    .template-preview {
        height: 200px;
        padding: 1.25rem 0.75rem;
        gap: 0.75rem;
    }
}

.template-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.template-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.template-name {
    font-weight: 600;
    font-size: 1rem;
}

.template-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 200px;
}

.template-link {
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

@media (max-width: 480px) {
    .template-link {
        height: 32px;
    }
}

/* Template Previews */
.minimalist-preview {
    background: #f8fafc;
}

.minimalist-preview .template-avatar {
    background: #e5e7eb;
}

.minimalist-preview .template-name {
    color: #1e293b;
}

.minimalist-preview .template-link {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.dark-preview {
    background: #0f172a;
}

.dark-preview .template-avatar {
    background: #334155;
}

.dark-preview .template-name {
    color: #f8fafc;
}

.dark-preview .template-link {
    background: #1e293b;
    border: 1px solid #334155;
}

.vibrant-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
}

.vibrant-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2), transparent 50%);
    pointer-events: none;
}

.vibrant-preview .template-name {
    color: #ffffff;
}

.matrix-preview {
    background: #000000;
    position: relative;
    overflow: hidden;
}

.matrix-preview::before {
    content: '01010101 10101010 11001100 00110011 01010101 10101010 11001100 00110011 01010101 10101010';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: #00ff00;
    opacity: 0.15;
    font-size: 0.5rem;
    line-height: 1.2;
    font-family: 'Courier New', monospace;
    word-wrap: break-word;
    padding: 0.5rem;
    animation: matrix-scroll 20s linear infinite;
}

@keyframes matrix-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.matrix-preview .template-name {
    color: #00ff00;
}

.matrix-preview .template-link {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.template-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.template-info {
    padding: 1rem 1.25rem 1.25rem;
    background: #f9fafb;
    position: relative;
    z-index: 2;
}

.template-info h3 {
    margin: 0 0 0.375rem 0;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 700;
}

.template-info p {
    margin: 0;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.4;
}

@media (max-width: 480px) {
    .template-info h3 {
        font-size: 1rem;
    }
    
    .template-info p {
        font-size: 0.8rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .editor-layout {
        grid-template-columns: 1fr !important;
    }

    .preview-column {
        display: none !important;
    }

    .mobile-preview-trigger {
        display: block;
    }

    .container {
        padding: 1.5rem;
    }

    .templates-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .action-bar {
        flex-direction: column;
    }

    .danger-zone-actions,
    .danger-actions {
        flex-direction: column !important;
    }

    .link-item-header {
        flex-direction: column;
    }

    .link-item-header .link-icon {
        flex: 1;
    }
}