* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", sans-serif;
    background: #f1f5f9;
}

/* MAIN LAYOUT */
.app {
    display: flex;
    height: 100vh;
}

/* LEFT PANEL */
.sidebar {
    width: 320px;
    background: white;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.sidebar h2 {
    margin-bottom: 15px;
}

.sidebar input,
.sidebar select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* BUTTONS */
.buttons {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

button {
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #1e40af;
}

/* RIGHT PANEL */
.preview {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CARD */
#card {
    width: 360px;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transition: 0.3s;
}

#card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

#card h2 {
    margin: 10px 0 5px;
}

/* TEMPLATES */
.blue {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.dark {
    background: #111827;
}

.gold {
    background: linear-gradient(135deg, #d4af37, #facc15);
    color: #000;
}

/* MOBILE */
@media(max-width: 768px) {
    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        box-shadow: none;
    }

    .preview {
        padding: 20px;
    }
}

.avatar-text {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: auto;
}

.template-picker {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tpl {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
}

.tpl:hover {
    border: 2px solid #2563eb;
}

.tpl.blue {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.tpl.dark {
    background: #111827;
}

.tpl.gold {
    background: linear-gradient(135deg, #d4af37, #facc15);
}

.tpl.minimal {
    background: #ffffff;
    border: 2px solid #161617;
}

.tpl.purple {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.tpl.green {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.tpl.red {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.tpl.glass {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #161617;
}

.tpl.corporate {
    background: #1e3a8a;
}

.tpl.neon {
    background: #0b0f19;
}

/* SEO Footer Styling */
.seo-footer {
    background-color: #f9f9f9;
    color: #333;
    padding: 60px 20px;
    margin-top: 50px;
    border-top: 1px solid #eee;
    line-height: 1.6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
}

.seo-footer h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.seo-footer h3 {
    color: #34495e;
    font-size: 1.4rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.seo-item {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.seo-footer ul,
.seo-footer ol {
    margin-bottom: 30px;
    padding-left: 20px;
}

.seo-footer li {
    margin-bottom: 10px;
}

.seo-conclusion {
    text-align: center;
    background: #2c3e50;
    color: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
}

.seo-conclusion p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .seo-footer {
        padding: 40px 15px;
    }

    .seo-footer h2 {
        font-size: 1.6rem;
    }
}

.settings {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.settings label {
    font-size: 12px;
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
}

.settings input,
.settings select {
    width: 100%;
    padding: 6px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    padding: 15px;
    height: 100vh;
    overflow: hidden;
    /* Strictly disables scrolling */
}

/* Make inputs smaller and tighter */
.sidebar input,
.sidebar select {
    margin-bottom: 8px;
    /* Reduced margin */
    padding: 8px;
    /* Tighter padding */
    font-size: 13px;
}

/* Make template swatches smaller to save vertical space */
.template-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 columns instead of 3 or 4 */
    gap: 5px;
    margin-bottom: 10px;
}

.tpl {
    width: 25px;
    height: 25px;
}

/* Stack buttons in two columns to save height */
.buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.buttons button {
    padding: 10px 5px;
    font-size: 12px;
}

.icon-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.icon-picker .icon {
  padding: 10px;
  background: #f1f5f9;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  border: 2px solid transparent;
}

.icon-picker .icon i {
  font-size: 18px;
}

.icon-picker .icon:hover {
  border-color: #2563eb;
  transform: scale(1.05);
}

.icon-picker .icon.active {
  border-color: #2563eb;
  background: #e0f2fe;
}