2 Sitoutukset a1c915b327 ... 43601d9a2a

Tekijä SHA1 Viesti Päivämäärä
  sark 43601d9a2a fix page front 1 kuukausi sitten
  sark fcc7e11ae6 add hreflang 1 kuukausi sitten

+ 0 - 11
bin/migrate.php

@@ -121,17 +121,6 @@ try {
         ['grupa' => 'styles', 'name' => 'burger-color2', 'value' => '#ffffff'],
 
         // SEO settings
-        ['grupa' => 'seo', 'name' => 'title', 'value' => 'Amazing Casino - Best Online Gaming Experience 2024'],
-        ['grupa' => 'seo', 'name' => 'description', 'value' => 'Join Amazing Casino for the ultimate online gaming experience. Enjoy 200+ games, generous bonuses, and secure payments. Licensed and trusted worldwide.'],
-        ['grupa' => 'seo', 'name' => 'keywords', 'value' => 'online casino, casino games, slots, blackjack, poker, roulette, bonuses, secure gaming'],
-        ['grupa' => 'seo', 'name' => 'canonical', 'value' => 'https://amazing-casino.com'],
-        ['grupa' => 'seo', 'name' => 'og-type', 'value' => 'website'],
-        ['grupa' => 'seo', 'name' => 'og-title', 'value' => 'Amazing Casino - Win Big with Our Casino Games'],
-        ['grupa' => 'seo', 'name' => 'og-description', 'value' => 'Experience the thrill of premium casino games with Amazing Casino. Get your 200% welcome bonus today!'],
-        ['grupa' => 'seo', 'name' => 'og-locale', 'value' => 'en_US'],
-        ['grupa' => 'seo', 'name' => 'og-image', 'value' => 'media/og-image.jpg'],
-        ['grupa' => 'seo', 'name' => 'lang', 'value' => 'en'],
-        ['grupa' => 'seo', 'name' => 'lang-page', 'value' => 'en-US'],
         ['grupa' => 'seo', 'name' => 'hreflang', 'value' => '[{"hreflang":"en","href":"https://amazing-casino.com/en/"},{"hreflang":"es","href":"https://amazing-casino.com/es/"},{"hreflang":"fr","href":"https://amazing-casino.com/fr/"},{"hreflang":"x-default","href":"https://amazing-casino.com/"}]'],
     ];
     

+ 1 - 1
public/index.php

@@ -4,7 +4,7 @@ require dirname(__FILE__, 2).'/vendor/autoload.php';
 //route
 $requestUri = $_GET['p'] ?? parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
 $page = match (true) {
-  ('/' === $requestUri) => 'home.php',
+  ('/' === $requestUri) => 'page.php',
   ('/admin/' === $requestUri) => 'admin/index.php',
   ('/admin/pages/' === $requestUri) => 'admin/pages.php',
   ('/admin/slots/' === $requestUri) => 'admin/slots.php',

+ 569 - 572
resources/view/admin/index.php

@@ -1,636 +1,633 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Admin Panel</title>
-    <script defer src="https://cdnjs.cloudflare.com/ajax/libs/alpinejs/3.15.0/cdn.js"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/8.1.2/tinymce.min.js"></script>
-    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
-    <link rel="stylesheet" href="/css/admin/style.css">
-</head>
-
-<body class="bg-gray-100 font-sans">
-    <div x-data="{ sidebarOpen: false }" class="flex h-screen">
-        <!-- Sidebar -->
-        <div :class="sidebarOpen ? 'translate-x-0' : '-translate-x-full'" 
-             class="fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-lg transform transition-transform duration-300 ease-in-out lg:translate-x-0 lg:static lg:inset-0">
-            <div class="flex items-center justify-center h-16 bg-blue-600">
-                <h1 class="text-xl font-semibold text-white">Admin Panel</h1>
-            </div>
-            <nav class="mt-5">
-                <div class="px-2">
-                    <a href="index.php" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-blue-600 bg-blue-50">
-                        <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
-                            <path d="M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z"/>
-                        </svg>
-                        Site Settings
-                    </a>
-                    <a href="pages.php" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md text-gray-600 hover:text-gray-900 hover:bg-gray-50 mt-1">
-                        <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
-                            <path fill-rule="evenodd" d="M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z" clip-rule="evenodd"/>
-                        </svg>
-                        Dynamic Pages
-                    </a>
-                </div>
-            </nav>
-        </div>
-
-        <!-- Mobile sidebar overlay -->
-        <div x-show="sidebarOpen" 
-             @click="sidebarOpen = false" 
-             class="fixed inset-0 z-40 bg-gray-600 bg-opacity-75 lg:hidden"
-             x-transition:enter="transition-opacity ease-linear duration-300"
-             x-transition:enter-start="opacity-0"
-             x-transition:enter-end="opacity-100"
-             x-transition:leave="transition-opacity ease-linear duration-300"
-             x-transition:leave-start="opacity-100"
-             x-transition:leave-end="opacity-0"></div>
-
-        <!-- Main content -->
-        <div class="flex-1 overflow-hidden">
-            <!-- Top bar -->
-            <div class="bg-white shadow-sm lg:hidden">
-                <div class="px-4 py-2">
-                    <button @click="sidebarOpen = true" class="text-gray-500 hover:text-gray-600">
-                        <svg class="h-6 w-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
-                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
-                        </svg>
-                    </button>
-                </div>
-            </div>
-            
-            <!-- Page content -->
-            <main class="flex-1 overflow-y-auto p-6">
-
-                <div class="bg-white rounded-lg shadow-sm">
-                    <div class="border-b border-gray-200">
-                        <nav class="-mb-px flex space-x-8" x-data="{ activeTab: 'content' }">
-                            <button @click="activeTab = 'content'" 
-                                    :class="activeTab === 'content' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
-                                    class="py-2 px-1 border-b-2 font-medium text-sm">
-                                Content
-                            </button>
-                            <button @click="activeTab = 'options'" 
-                                    :class="activeTab === 'options' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
-                                    class="py-2 px-1 border-b-2 font-medium text-sm">
-                                Options
-                            </button>
-                            <button @click="activeTab = 'styles'" 
-                                    :class="activeTab === 'styles' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
-                                    class="py-2 px-1 border-b-2 font-medium text-sm">
-                                Styles
-                            </button>
-                            <button @click="activeTab = 'seo'" 
-                                    :class="activeTab === 'seo' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'"
-                                    class="py-2 px-1 border-b-2 font-medium text-sm">
-                                SEO & Meta
-                            </button>
-                        </nav>
-                    </div>
-
+<?php 
+$pageTitle = 'Site Settings - Admin Panel';
+$headerTitle = 'Site Settings';
+$activeTab = 'content';
+
+$tabs = [
+    'content' => [
+        'label' => 'Content',
+        'icon' => 'M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z'
+    ],
+    'options' => [
+        'label' => 'Options',
+        'icon' => 'M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z'
+    ],
+    'styles' => [
+        'label' => 'Styles',
+        'icon' => 'M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4z'
+    ],
+    'seo' => [
+        'label' => 'SEO & Meta',
+        'icon' => 'M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z'
+    ],
+    'jsonld' => [
+        'label' => 'JSON-LD',
+        'icon' => 'M8 4a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1zm0 4a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1zm0 4a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z'
+    ]
+];
+
+ob_start();
+?>
+<?php include __DIR__ . '/partials/tabs.php'; ?>
+
+<!-- Form -->
                     <form method="POST" action="" enctype="multipart/form-data">
                         <input type="hidden" name="form_submitted" value="1">
 
                         <!-- Content Tab -->
-                        <div x-show="activeTab === 'content'" class="p-6">
-                            <h2 class="text-lg font-medium text-gray-900 mb-6">Page Content</h2>
+                        <div x-show="activeTab === 'content'" class="bg-white rounded-lg shadow-sm">
+                            <div class="p-6 space-y-8">
 
-                            <div class="grid grid-cols-1 gap-6">
+                                <!-- Button Settings -->
                                 <div>
-                                    <label class="block text-sm font-medium text-gray-700 mb-2">Page Title (H1)</label>
-                                    <input type="text" name='content[title]' value="<?= $content['title'] ?? '' ?>" 
-                                           class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500">
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Header Button Settings
+                                    </h3>
+                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Header Button Text 1</label>
+                                            <input type="text" name='content[header_btn_1]' value="<?= htmlspecialchars($content['header_btn_1'] ?? '') ?>"
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Header Button Text 2</label>
+                                            <input type="text" name='content[header_btn_2]' value="<?= htmlspecialchars($content['header_btn_2'] ?? '') ?>"
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+
+                                        <div class="flex items-center lg:col-span-2">
+                                            <input type="hidden" name="content[hide-btns]" value="0">
+                                            <input type="checkbox" name="content[hide-btns]" value="1" <?= !empty($content['hide-btns']) ? 'checked' : '' ?>
+                                                   class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
+                                            <label class="ml-2 block text-sm text-gray-900">Hide header buttons</label>
+                                        </div>
+                                    </div>
                                 </div>
 
+                                <!-- Images & Media Section -->
                                 <div>
-                                    <label class="block text-sm font-medium text-gray-700 mb-2">Top Text</label>
-                                    <textarea name='content[top_text]' rows="6" 
-                                              class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"><?= urldecode($content['top_text'] ?? '') ?></textarea>
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Images & Media
+                                    </h3>
+                                    
+                                    <!-- Header Logo -->
+                                    <div class="bg-gray-50 p-4 rounded-lg mb-6">
+                                        <h4 class="text-md font-medium text-gray-800 mb-4">Header Logo</h4>
+                                        <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
+                                            <div>
+                                                <?php 
+                                                $headerLogo = [];
+                                                if (isset($content['header-logo']) && !empty($content['header-logo'])) {
+                                                    $headerLogo = json_decode($content['header-logo'], true) ?: [];
+                                                }
+                                                ?>
+                                                <?php if (!empty($headerLogo['src'])): ?>
+                                                    <img class="w-24 h-24 object-cover rounded-lg border mb-2" src="../<?= $headerLogo['src'] ?>" alt="Header Logo">
+                                                <?php endif; ?>
+                                                <label class="block text-sm font-medium text-gray-700 mb-2">Upload Header Logo</label>
+                                                <input type="file" name="content[header-logo]" accept="image/*" 
+                                                       class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
+                                            </div>
+                                            <div>
+                                                <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
+                                                <input type="text" name='content[header-logo][title]' value="<?= htmlspecialchars($headerLogo['title'] ?? '') ?>" 
+                                                       class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                            <div>
+                                                <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
+                                                <input type="text" name='content[header-logo][alt]' value="<?= htmlspecialchars($headerLogo['alt'] ?? '') ?>" 
+                                                       class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
+                                    </div>
+
+                                    <!-- Banner Logo -->
+                                    <div class="bg-gray-50 p-4 rounded-lg mb-6">
+                                        <h4 class="text-md font-medium text-gray-800 mb-4">Banner Image</h4>
+                                        <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
+                                            <div>
+                                                <?php 
+                                                $bannerLogo = [];
+                                                if (isset($content['banner-logo']) && !empty($content['banner-logo'])) {
+                                                    $bannerLogo = json_decode($content['banner-logo'], true) ?: [];
+                                                }
+                                                ?>
+                                                <?php if (!empty($bannerLogo['src'])): ?>
+                                                    <img class="w-full h-24 object-cover rounded-lg border mb-2" src="../<?= $bannerLogo['src'] ?>" alt="Banner Image">
+                                                <?php endif; ?>
+                                                <label class="block text-sm font-medium text-gray-700 mb-2">Upload Banner Image</label>
+                                                <input type="file" name="content[banner-logo]" accept="image/*" 
+                                                       class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
+                                            </div>
+                                            <div class="space-y-4">
+                                                <div>
+                                                    <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
+                                                    <input type="text" name='content[banner-logo][title]' value="<?= htmlspecialchars($bannerLogo['title'] ?? '') ?>" 
+                                                           class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                                </div>
+                                                <div>
+                                                    <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
+                                                    <input type="text" name='content[banner-logo][alt]' value="<?= htmlspecialchars($bannerLogo['alt'] ?? '') ?>" 
+                                                           class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                                </div>
+                                                <div class="grid grid-cols-2 gap-4">
+                                                    <div>
+                                                        <label class="block text-sm font-medium text-gray-700 mb-2">Width</label>
+                                                        <input type="text" name='content[banner-logo][width]' value="<?= htmlspecialchars($bannerLogo['width'] ?? '') ?>" 
+                                                               class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                                    </div>
+                                                    <div>
+                                                        <label class="block text-sm font-medium text-gray-700 mb-2">Height</label>
+                                                        <input type="text" name='content[banner-logo][height]' value="<?= htmlspecialchars($bannerLogo['height'] ?? '') ?>" 
+                                                               class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                                    </div>
+                                                </div>
+                                            </div>
+                                        </div>
+                                    </div>
+
+                                    <!-- Footer Logo -->
+                                    <div class="bg-gray-50 p-4 rounded-lg mb-6">
+                                        <h4 class="text-md font-medium text-gray-800 mb-4">Footer Logo</h4>
+                                        <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
+                                            <div>
+                                                <?php 
+                                                $footerLogo = [];
+                                                if (isset($content['footer-logo']) && !empty($content['footer-logo'])) {
+                                                    $footerLogo = json_decode($content['footer-logo'], true) ?: [];
+                                                }
+                                                ?>
+                                                <?php if (!empty($footerLogo['src'])): ?>
+                                                    <img class="w-24 h-24 object-cover rounded-lg border mb-2" src="../<?= $footerLogo['src'] ?>" alt="Footer Logo">
+                                                <?php endif; ?>
+                                                <label class="block text-sm font-medium text-gray-700 mb-2">Upload Footer Logo</label>
+                                                <input type="file" name="content[footer-logo]" accept="image/*" 
+                                                       class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
+                                            </div>
+                                            <div>
+                                                <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
+                                                <input type="text" name='content[footer-logo][title]' value="<?= htmlspecialchars($footerLogo['title'] ?? '') ?>" 
+                                                       class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                            <div>
+                                                <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
+                                                <input type="text" name='content[footer-logo][alt]' value="<?= htmlspecialchars($footerLogo['alt'] ?? '') ?>" 
+                                                       class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
+                                    </div>
+
+                                    <!-- Other Images -->
+                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
+                                        <div class="bg-gray-50 p-4 rounded-lg">
+                                            <h4 class="text-md font-medium text-gray-800 mb-4">Favicon</h4>
+                                            <?php if (!empty($content['favicon'])): ?>
+                                                <img class="w-16 h-16 object-cover rounded border mb-2" src="../<?= $content['favicon'] ?>" alt="Favicon">
+                                            <?php endif; ?>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Upload Favicon</label>
+                                            <input type="file" name="content[favicon]" accept="image/*"
+                                                   class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
+                                        </div>
+                                    </div>
                                 </div>
 
-                    <div class="item">
-                        <h3>Bottom Text</h3>
-                        <textarea class="secondary-content" name='content[bottom_text]'><?= htmlspecialchars($content['bottom_text'] ?? '', ENT_QUOTES, 'UTF-8') ?></textarea>
-                    </div>
-
-                    <div class="item">
-                        <span>Author name</span>
-                        <input type="text" name='content[author-name]' value="<?= $content['author-name'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Modified date</span>
-                        <input type="text" name='content[modified-date]' value="<?= $content['modified-date'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Text login button</span>
-                        <input type="text" name='content[login]' value="<?= $content['login'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Text password button</span>
-                        <input type="text" name='content[password]' value="<?= $content['password'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Faq title</span>
-                        <input type="text" name='content[faq-title]' value="<?= $content['faq-title'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Footer text</span>
-                        <textarea name='content[footer__text]'><?= $content['footer__text'] ?? '' ?></textarea>
-                    </div>
-
-                    <div class="item">
-                        <span>Copyright</span>
-                        <textarea name='content[copyright]'><?= $content['copyright'] ?? '' ?></textarea>
-                    </div>
-
-
-                    <h3>Casino/Review Settings</h3>
-                    <hr>
-
-                    <div class="item">
-                        <span>Review casino count</span>
-                        <input type="text" name='content[review-count]' value="<?= $content['review-count'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>h2 - Casino listing</span>
-                        <input type="text" name='content[listing]' value="<?= $content['listing'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Text content button</span>
-                        <input type="text" name='content[content_btn]' value="<?= $content['content_btn'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Hide login-password btns</span>
-                        <input type="hidden" name="content[hide-btns]" value="0">
-                        <input type="checkbox" name="content[hide-btns]" value="1" <?= !empty($content['hide-btns']) ? 'checked' : '' ?>>
-                    </div>
-
-
-                    <h3>Images & Media</h3>
-                    <hr>
-
-                    <div class="img-block">
-                        <div class="item">
-                            <?php 
-                            $headerLogo = [];
-                            if (isset($content['header-logo']) && !empty($content['header-logo'])) {
-                                $headerLogo = json_decode($content['header-logo'], true) ?: [];
-                            }
-                            ?>
-                            <?php if (!empty($headerLogo['src'])): ?>
-                                <img class="img-thumb" src="../<?= $headerLogo['src'] ?>" alt="Header Logo">
-                            <?php endif; ?>
-                            <span>Header logo</span>
-                            <input type="file" name="content[header-logo]">
-                        </div>
-                        <div>
-                            <span>Header logo title</span>
-                            <input type="text" name='content[header-logo][title]' value="<?= htmlspecialchars($headerLogo['title'] ?? '') ?>">
-                            <span>Header logo alt</span>
-                            <input type="text" name='content[header-logo][alt]' value="<?= htmlspecialchars($headerLogo['alt'] ?? '') ?>">
-                        </div>
-                    </div>
-
-                    <div class="img-block">
-                        <div class="item">
-                            <?php 
-                            $bannerLogo = [];
-                            if (isset($content['banner-logo']) && !empty($content['banner-logo'])) {
-                                $bannerLogo = json_decode($content['banner-logo'], true) ?: [];
-                            }
-                            ?>
-                            <?php if (!empty($bannerLogo['src'])): ?>
-                                <img class="img-thumb" src="../<?= $bannerLogo['src'] ?>" alt="Banner Image">
-                            <?php endif; ?>
-                            <span>Banner Image</span>
-                            <input type="file" name="content[banner-logo]">
-                        </div>
-                        <div>
-                            <span>Banner logo title</span>
-                            <input type="text" name='content[banner-logo][title]' value="<?= htmlspecialchars($bannerLogo['title'] ?? '') ?>">
-                            <span>Banner logo alt</span>
-                            <input type="text" name='content[banner-logo][alt]' value="<?= htmlspecialchars($bannerLogo['alt'] ?? '') ?>">
-                            <span>Banner logo width</span>
-                            <input type="text" name='content[banner-logo][width]' value="<?= htmlspecialchars($bannerLogo['width'] ?? '') ?>">
-                            <span>Banner logo height</span>
-                            <input type="text" name='content[banner-logo][height]' value="<?= htmlspecialchars($bannerLogo['height'] ?? '') ?>">
-                        </div>
-                    </div>
-
-                    <div class="img-block">
-                        <div class="item">
-                            <?php 
-                            $footerLogo = [];
-                            if (isset($content['footer-logo']) && !empty($content['footer-logo'])) {
-                                $footerLogo = json_decode($content['footer-logo'], true) ?: [];
-                            }
-                            ?>
-                            <?php if (!empty($footerLogo['src'])): ?>
-                                <img class="img-thumb" src="../<?= $footerLogo['src'] ?>" alt="Footer Logo">
-                            <?php endif; ?>
-                            <span>Footer logo</span>
-                            <input type="file" name="content[footer-logo]">
-                        </div>
-                        <div>
-                            <span>Footer logo title</span>
-                            <input type="text" name='content[footer-logo][title]' value="<?= htmlspecialchars($footerLogo['title'] ?? '') ?>">
-                            <span>Footer logo alt</span>
-                            <input type="text" name='content[footer-logo][alt]' value="<?= htmlspecialchars($footerLogo['alt'] ?? '') ?>">
-                        </div>
-                    </div>
-
-                    <div class="item">
-                        <?php if (!empty($content['favicon'])): ?>
-                            <img class="img-thumb" src="../<?= $content['favicon'] ?>" alt="Favicon">
-                        <?php endif; ?>
-                        <span>Favicon</span>
-                        <input type="file" name="content[favicon]">
-                    </div>
-
-                    <div class="item">
-                        <?php if (!empty($content['author-img'])): ?>
-                            <img class="img-thumb" src="../<?= $content['author-img'] ?>" alt="author-img">
-                        <?php endif; ?>
-                        <span>Author img</span>
-                        <input type="file" name="content[author-img]">
-                    </div>
-
-
-                    <h3>Dynamic Content</h3>
-                    <hr>
-
-                    <!-- FAQ Section -->
-                    <div x-data="{ 
-                        faqItems: <?= htmlspecialchars(json_encode($faqItems ?? []), ENT_QUOTES, 'UTF-8'); ?> || []
-                    }">
-                        <h4>FAQ Items</h4>
-                        <button type="button" @click="faqItems.push({ question: '', answer: '' })" style="background: #007bff; color: white; border: none; padding: 10px 20px; border-radius: 4px; margin-bottom: 15px; cursor: pointer; font-size: 14px;">+ Add FAQ Item</button>
-
-                        <template x-for="(item, index) in faqItems" :key="index">
-                            <div style="margin-bottom: 15px; padding: 15px; border: 1px solid #ddd;">
-                                <div style="display: grid; grid-template-columns: 1fr auto; gap: 15px; align-items: start;">
-                                    <div style="display: flex; flex-direction: column; gap: 10px;">
+                                <!-- Footer Settings -->
+                                <div>
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Footer Content
+                                    </h3>
+                                    <div class="grid grid-cols-1 gap-6">
                                         <div>
-                                            <label style="display: block; margin-bottom: 5px; font-weight: bold;">Question</label>
-                                            <input type="text" x-model="item.question" :name="`content[faq][${index}][question]`" placeholder="Question" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Footer Text</label>
+                                            <textarea name='content[footer__text]' rows="4" 
+                                                      class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><?= htmlspecialchars($content['footer__text'] ?? '') ?></textarea>
                                         </div>
+
                                         <div>
-                                            <label style="display: block; margin-bottom: 5px; font-weight: bold;">Answer</label>
-                                            <textarea x-model="item.answer" :name="`content[faq][${index}][answer]`" placeholder="Answer" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; min-height: 80px;"></textarea>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Copyright</label>
+                                            <textarea name='content[copyright]' rows="2" 
+                                                      class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><?= htmlspecialchars($content['copyright'] ?? '') ?></textarea>
                                         </div>
                                     </div>
-                                    <button type="button" @click="faqItems.splice(index, 1)" style="background: #dc3545; color: white; border: none; padding: 8px 12px; border-radius: 4px;">Remove</button>
                                 </div>
-                            </div>
-                        </template>
-                    </div>
-
-                    <!-- Menu Section -->
-                    <div x-data="{ 
-                        menuItems: <?= htmlspecialchars(json_encode($menuItems ?? []), ENT_QUOTES, 'UTF-8'); ?> || []
-                    }">
-                        <h4>Menu Items</h4>
-                        <button type="button" @click="menuItems.push({ title: '', anchor: '' })" style="background: #007bff; color: white; border: none; padding: 10px 20px; border-radius: 4px; margin-bottom: 15px; cursor: pointer; font-size: 14px;">+ Add Menu Item</button>
-
-                        <template x-for="(item, index) in menuItems" :key="index">
-                            <div style="margin-bottom: 15px; padding: 15px; border: 1px solid #ddd;">
-                                <div style="display: grid; grid-template-columns: 1fr 1fr auto; gap: 15px; align-items: center;">
-                                    <div>
-                                        <label style="display: block; margin-bottom: 5px; font-weight: bold;">Menu Title</label>
-                                        <input type="text" x-model="item.title" :name="`content[menu][${index}][title]`" placeholder="Menu Title" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
-                                    </div>
-                                    <div>
-                                        <label style="display: block; margin-bottom: 5px; font-weight: bold;">Anchor Link</label>
-                                        <input type="text" x-model="item.anchor" :name="`content[menu][${index}][anchor]`" placeholder="#section" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
-                                    </div>
-                                    <button type="button" @click="menuItems.splice(index, 1)" style="background: #dc3545; color: white; border: none; padding: 8px 12px; border-radius: 4px; margin-top: 25px;">Remove</button>
+
+                                <!-- Save Button -->
+                                <div class="pt-6 border-t border-gray-200">
+                                    <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
+                                        <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Save Changes
+                                    </button>
                                 </div>
                             </div>
-                        </template>
-                    </div>
-
-                    <!-- Casino List Section -->
-                    <div x-data="{ 
-                        casinoItems: <?= htmlspecialchars(json_encode($casinoItems ?? []), ENT_QUOTES, 'UTF-8'); ?> || []
-                    }">
-                        <h4>Casino List</h4>
-                        <button type="button" @click="casinoItems.push({ heading: '', text: '', button: '', rating: '' })" style="background: #007bff; color: white; border: none; padding: 10px 20px; border-radius: 4px; margin-bottom: 15px; cursor: pointer; font-size: 14px;">+ Add Casino</button>
-
-                        <template x-for="(item, index) in casinoItems" :key="index">
-                            <div style="margin-bottom: 20px; padding: 15px; border: 1px solid #ddd;">
-                                <div style="display: grid; grid-template-columns: 1fr auto; gap: 15px; align-items: start;">
-                                    <div style="display: flex; flex-direction: column; gap: 10px;">
+                        </div>
+
+                        <!-- Options Tab -->
+                        <div x-show="activeTab === 'options'" class="bg-white rounded-lg shadow-sm">
+                            <div class="p-6 space-y-8">
+                                
+                                <!-- Hash Fields Section -->
+                                <div>
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Hash Fields
+                                    </h3>
+                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
                                         <div>
-                                            <label style="display: block; margin-bottom: 5px; font-weight: bold;">Casino Name</label>
-                                            <input type="text" x-model="item.heading" :name="`content[casino_list][${index}][heading]`" placeholder="Casino Name" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash</label>
+                                            <input type="text" name='content[hash]' value="<?= htmlspecialchars($content['hash'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                                         </div>
+
                                         <div>
-                                            <label style="display: block; margin-bottom: 5px; font-weight: bold;">Bonus Text</label>
-                                            <input type="text" x-model="item.text" :name="`content[casino_list][${index}][text]`" placeholder="Bonus Text" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 1</label>
+                                            <input type="text" name='content[hash-1]' value="<?= htmlspecialchars($content['hash-1'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                                         </div>
+
                                         <div>
-                                            <label style="display: block; margin-bottom: 5px; font-weight: bold;">Button Text</label>
-                                            <input type="text" x-model="item.button" :name="`content[casino_list][${index}][button]`" placeholder="Button Text" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 2</label>
+                                            <input type="text" name='content[hash-2]' value="<?= htmlspecialchars($content['hash-2'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                                         </div>
+
                                         <div>
-                                            <label style="display: block; margin-bottom: 5px; font-weight: bold;">Rating</label>
-                                            <input type="text" x-model="item.rating" :name="`content[casino_list][${index}][rating]`" placeholder="Rating (e.g. 9.5)" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 3</label>
+                                            <input type="text" name='content[hash-3]' value="<?= htmlspecialchars($content['hash-3'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                                         </div>
+
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 4</label>
+                                            <input type="text" name='content[hash-4]' value="<?= htmlspecialchars($content['hash-4'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+
                                         <div>
-                                            <label style="display: block; margin-bottom: 5px; font-weight: bold;">Casino Image</label>
-                                            <input type="file" :name="`casino_image_${index}`" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 5</label>
+                                            <input type="text" name='content[hash-5]' value="<?= htmlspecialchars($content['hash-5'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                                         </div>
                                     </div>
-                                    <button type="button" @click="casinoItems.splice(index, 1)" style="background: #dc3545; color: white; border: none; padding: 8px 12px; border-radius: 4px;">Remove</button>
                                 </div>
-                            </div>
-                        </template>
-                    </div>
-                </div>
-
-                <!-- Options Tab -->
-                <div x-show="activeTab === 'options'" x-transition class="tab-content">
-                    <h2>Additional Options</h2>
-                    <hr>
-
-                    <h3>Hash Fields</h3>
-                    <hr>
-
-                    <div class="item">
-                        <span>Hash:</span>
-                        <input type="text" name='content[hash]' value="<?= $content['hash'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Hash-1:</span>
-                        <input type="text" name='content[hash-1]' value="<?= $content['hash-1'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Hash-2:</span>
-                        <input type="text" name='content[hash-2]' value="<?= $content['hash-2'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Hash-3:</span>
-                        <input type="text" name='content[hash-3]' value="<?= $content['hash-3'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Hash-4:</span>
-                        <input type="text" name='content[hash-4]' value="<?= $content['hash-4'] ?? '' ?>">
-                    </div>
-
-                    <div class="item">
-                        <span>Hash-5:</span>
-                        <input type="text" name='content[hash-5]' value="<?= $content['hash-5'] ?? '' ?>">
-                    </div>
-                </div>
-
-                <!-- Styles Tab -->
-                <div x-show="activeTab === 'styles'" x-transition class="tab-content">
-                    <h2>Design & Colors</h2>
-                    <hr>
-
-                    <div class="style-grid">
-                        <div class="item">
-                            <span>Main color (body background)</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[main_color]' value="<?= $styles['main_color'] ?? '' ?>">
-                            </div>
-                        </div>
-
-                        <div class="item">
-                            <span>Secondary color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[secondary_color]' value="<?= $styles['secondary_color'] ?? '' ?>">
-                            </div>
-                        </div>
 
-                        <div class="item">
-                            <span>Accent color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[accent_color]' value="<?= $styles['accent_color'] ?? '' ?>">
+                                <!-- Save Button -->
+                                <div class="pt-6 border-t border-gray-200">
+                                    <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
+                                        <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Save Changes
+                                    </button>
+                                </div>
                             </div>
                         </div>
 
-                        <div class="item">
-                            <span>Font color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[font_color]' value="<?= $styles['font_color'] ?? '' ?>">
-                            </div>
-                        </div>
+                        <!-- Styles Tab -->
+                        <div x-show="activeTab === 'styles'" class="bg-white rounded-lg shadow-sm">
+                            <div class="p-6 space-y-8">
 
-                        <div class="item">
-                            <span>Link color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[link_color]' value="<?= $styles['link_color'] ?? '' ?>">
-                            </div>
-                        </div>
+                                <!-- Color Settings Section -->
+                                <div>
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Цветовые настройки
+                                    </h3>
+                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
+                                        <!-- Цвет хедера -->
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет хедера (шапки сайта)</label>
+                                            <div class="flex gap-3">
+                                                <input type="color" value="<?= $styles['header_color'] ?? '#1E1E1E' ?>"
+                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
+                                                       onchange="this.nextElementSibling.value = this.value">
+                                                <input type="text" name='styles[header_color]' value="<?= htmlspecialchars($styles['header_color'] ?? '') ?>"
+                                                       placeholder="#1E1E1E"
+                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
 
-                        <div class="item">
-                            <span>Header background</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[header_color]' value="<?= $styles['header_color'] ?? '' ?>">
-                            </div>
-                        </div>
+                                        <!-- Цвет body (фон) -->
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет body (фон сайта)</label>
+                                            <div class="flex gap-3">
+                                                <input type="color" value="<?= $styles['body_bg_color'] ?? '#0A0A0A' ?>"
+                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
+                                                       onchange="this.nextElementSibling.value = this.value">
+                                                <input type="text" name='styles[body_bg_color]' value="<?= htmlspecialchars($styles['body_bg_color'] ?? '') ?>"
+                                                       placeholder="#0A0A0A"
+                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
 
-                        <div class="item">
-                            <span>Footer background</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[footer_color]' value="<?= $styles['footer_color'] ?? '' ?>">
-                            </div>
-                        </div>
+                                        <!-- Цвет контентной части -->
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет контентной части</label>
+                                            <div class="flex gap-3">
+                                                <input type="color" value="<?= $styles['content_bg_color'] ?? '#1A1A1A' ?>"
+                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
+                                                       onchange="this.nextElementSibling.value = this.value">
+                                                <input type="text" name='styles[content_bg_color]' value="<?= htmlspecialchars($styles['content_bg_color'] ?? '') ?>"
+                                                       placeholder="#1A1A1A"
+                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
 
-                        <div class="item">
-                            <span>Hover link color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[hover_link_color]' value="<?= $styles['hover_link_color'] ?? '' ?>">
-                            </div>
-                        </div>
+                                        <!-- Цвет текста основного -->
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет текста основного</label>
+                                            <div class="flex gap-3">
+                                                <input type="color" value="<?= $styles['text_color'] ?? '#FFFFFF' ?>"
+                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
+                                                       onchange="this.nextElementSibling.value = this.value">
+                                                <input type="text" name='styles[text_color]' value="<?= htmlspecialchars($styles['text_color'] ?? '') ?>"
+                                                       placeholder="#FFFFFF"
+                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
 
-                        <div class="item">
-                            <span>Login btn font color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[login_btn_color]' value="<?= $styles['login_btn_color'] ?? '' ?>">
-                            </div>
-                        </div>
+                                        <!-- Цвет текста ссылок в контенте -->
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет текста ссылок в контенте</label>
+                                            <div class="flex gap-3">
+                                                <input type="color" value="<?= $styles['link_color'] ?? '#4A9EFF' ?>"
+                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
+                                                       onchange="this.nextElementSibling.value = this.value">
+                                                <input type="text" name='styles[link_color]' value="<?= htmlspecialchars($styles['link_color'] ?? '') ?>"
+                                                       placeholder="#4A9EFF"
+                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
 
-                        <div class="item">
-                            <span>Password btn font color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[pass_btn_color]' value="<?= $styles['pass_btn_color'] ?? '' ?>">
-                            </div>
-                        </div>
+                                        <!-- Цвет таблицы -->
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет таблицы (фон)</label>
+                                            <div class="flex gap-3">
+                                                <input type="color" value="<?= $styles['table_bg_color'] ?? '#1A1A1A' ?>"
+                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
+                                                       onchange="this.nextElementSibling.value = this.value">
+                                                <input type="text" name='styles[table_bg_color]' value="<?= htmlspecialchars($styles['table_bg_color'] ?? '') ?>"
+                                                       placeholder="#1A1A1A"
+                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
 
-                        <div class="item">
-                            <span>Table bgcolor</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[table]' value="<?= $styles['table'] ?? '' ?>">
-                            </div>
-                        </div>
+                                        <!-- Цвет шапки таблицы -->
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет шапки таблицы (thead)</label>
+                                            <div class="flex gap-3">
+                                                <input type="color" value="<?= $styles['table_header_color'] ?? '#2A2A2A' ?>"
+                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
+                                                       onchange="this.nextElementSibling.value = this.value">
+                                                <input type="text" name='styles[table_header_color]' value="<?= htmlspecialchars($styles['table_header_color'] ?? '') ?>"
+                                                       placeholder="#2A2A2A"
+                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
 
-                        <div class="item">
-                            <span>Table caption bgcolor</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[caption]' value="<?= $styles['caption'] ?? '' ?>">
-                            </div>
-                        </div>
+                                        <!-- Цвет фона футера -->
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет фона футера</label>
+                                            <div class="flex gap-3">
+                                                <input type="color" value="<?= $styles['footer_bg_color'] ?? '#1E1E1E' ?>"
+                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
+                                                       onchange="this.nextElementSibling.value = this.value">
+                                                <input type="text" name='styles[footer_bg_color]' value="<?= htmlspecialchars($styles['footer_bg_color'] ?? '') ?>"
+                                                       placeholder="#1E1E1E"
+                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
 
-                        <div class="item">
-                            <span>Faq title font color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[faq-title-font-color]' value="<?= $styles['faq-title-font-color'] ?? '' ?>">
+                                <!-- Save Button -->
+                                <div class="pt-6 border-t border-gray-200">
+                                    <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
+                                        <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Сохранить изменения
+                                    </button>
+                                </div>
                             </div>
                         </div>
 
-                        <div class="item">
-                            <span>Faq title hover font color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[faq-title-hover-font-color]' value="<?= $styles['faq-title-hover-font-color'] ?? '' ?>">
-                            </div>
-                        </div>
+                        <!-- SEO Tab -->
+                        <div x-show="activeTab === 'seo'" class="bg-white rounded-lg shadow-sm">
+                            <div class="p-6 space-y-8">
+
+                                <!-- Hreflang Settings -->
+                                <div x-data="{ 
+                                    hreflangs: <?= htmlspecialchars(json_encode(isset($seo['hreflang']) ? json_decode($seo['hreflang'], true) ?: [] : []), ENT_QUOTES, 'UTF-8') ?>,
+                                    addHreflang() {
+                                        this.hreflangs.push({hreflang: '', href: ''});
+                                    },
+                                    removeHreflang(index) {
+                                        this.hreflangs.splice(index, 1);
+                                    }
+                                }">
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M7 2a1 1 0 011 1v1h3a1 1 0 110 2H9.578a18.87 18.87 0 01-1.724 4.78c.29.354.596.696.914 1.026a1 1 0 11-1.44 1.389c-.188-.196-.373-.396-.554-.6a18.9 18.9 0 01-2.62 3.624 1 1 0 11-1.44-1.389A16.9 16.9 0 003.578 8H2a1 1 0 110-2h2.578c.15-.667.34-1.32.578-1.96A1 1 0 015.5 4c.76 0 1.5.11 2.5.342V3a1 1 0 011-1zm1.578 6H7.422c.12.456.264.903.428 1.34.164-.437.308-.884.428-1.34zM17 6a3 3 0 11-6 0 3 3 0 016 0z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Hreflang Settings
+                                    </h3>
+                                    
+                                    <!-- Hidden input to store JSON data -->
+                                    <input type="hidden" name="seo[hreflang]" x-bind:value="JSON.stringify(hreflangs)">
+                                    
+                                    <div class="space-y-4">
+                                        <template x-for="(item, index) in hreflangs" :key="index">
+                                            <div class="flex gap-4 items-end">
+                                                <div class="flex-1">
+                                                    <label class="block text-sm font-medium text-gray-700 mb-2">Language Code</label>
+                                                    <input type="text" x-model="item.hreflang" placeholder="en, ru, de, x-default" 
+                                                           class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                                </div>
+                                                <div class="flex-2">
+                                                    <label class="block text-sm font-medium text-gray-700 mb-2">URL</label>
+                                                    <input type="url" x-model="item.href" placeholder="https://example.com/en/" 
+                                                           class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                                </div>
+                                                <button type="button" @click="removeHreflang(index)" 
+                                                        class="px-3 py-2 text-red-600 hover:text-red-800 border border-red-300 hover:border-red-500 rounded-md transition-colors">
+                                                    <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
+                                                        <path fill-rule="evenodd" d="M9 2a1 1 0 000 2h2a1 1 0 100-2H9z" clip-rule="evenodd"/>
+                                                        <path 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"/>
+                                                    </svg>
+                                                </button>
+                                            </div>
+                                        </template>
+                                        
+                                        <button type="button" @click="addHreflang()" 
+                                                class="inline-flex items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">
+                                            <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
+                                                <path fill-rule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" clip-rule="evenodd"/>
+                                            </svg>
+                                            Add Hreflang
+                                        </button>
+                                    </div>
+                                </div>
 
-                        <div class="item">
-                            <span>Mobile burger menu color</span>
-                            <div>
-                                <input type="color" class="inp-color">
-                                <input type="text" class="inp-color-text" name='styles[burger-color]' value="<?= $styles['burger-color'] ?? '' ?>">
+                                <!-- Save Button -->
+                                <div class="pt-6 border-t border-gray-200">
+                                    <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
+                                        <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Save Settings
+                                    </button>
+                                </div>
                             </div>
                         </div>
-                    </div>
-
-                    <div class="item">
-                        <span>Font-family</span>
-                        <input type="text" name='styles[main-fz]' value="<?= $styles['main-fz'] ?? '' ?>">
-                    </div>
-                </div>
-
-                <!-- SEO Tab -->
-                <div x-show="activeTab === 'seo'" x-transition class="tab-content">
-                        <h2>SEO & Meta Data</h2>
-                        <hr>
-
-                        <!-- Debug: <?= json_encode($seo) ?> -->
-                        <div class="item">
-                            <span>SEO Title:</span>
-                            <input type="text" name='seo[title]' value="<?= $seo['title'] ?? '' ?>">
-                        </div>
-
-                        <div class="item">
-                            <span>Meta Description:</span>
-                            <textarea name='seo[description]'><?= $seo['description'] ?? '' ?></textarea>
-                        </div>
-
-                        <div class="item">
-                            <span>Meta Keywords:</span>
-                            <textarea name='seo[keywords]'><?= $seo['keywords'] ?? '' ?></textarea>
-                        </div>
-
-                        <div class="item">
-                            <span>Canonical URL:</span>
-                            <input type="text" name='seo[canonical]' value="<?= $seo['canonical'] ?? '' ?>">
-                        </div>
-
-                        <h3>Open Graph Data</h3>
-                        <hr>
-
-                        <div class="item">
-                            <span>og:type</span>
-                            <input type="text" name='seo[og-type]' value="<?= $seo['og-type'] ?? '' ?>">
-                        </div>
-                        <div class="item">
-                            <span>og:title</span>
-                            <input type="text" name='seo[og-title]' value="<?= $seo['og-title'] ?? '' ?>">
-                        </div>
-                        <div class="item">
-                            <span>og:description</span>
-                            <textarea name='seo[og-description]'><?= $seo['og-description'] ?? '' ?></textarea>
-                        </div>
-                        <div class="item">
-                            <span>og:locale</span>
-                            <input type="text" name='seo[og-locale]' value="<?= $seo['og-locale'] ?? '' ?>">
-                        </div>
-                        <div class="item">
-                            <?php if (!empty($seo['og-image'])): ?>
-                                <img class="img-thumb" src="../<?= $seo['og-image'] ?>" alt="OG Image">
-                            <?php endif; ?>
-                            <span>og:image</span>
-                            <input type="file" name="seo[og-image]">
-                        </div>
-
-                        <h3>Language & Localization</h3>
-                        <hr>
 
-                        <div class="item">
-                            <span>Lang home:</span>
-                            <input type="text" name='seo[lang]' value="<?= $seo['lang'] ?? '' ?>">
-                        </div>
+                        <!-- JSON-LD Tab -->
+                        <div x-show="activeTab === 'jsonld'" class="bg-white rounded-lg shadow-sm">
+                            <div class="p-6 space-y-8">
 
-                        <div class="item">
-                            <span>Lang page:</span>
-                            <input type="text" name='seo[lang-page]' value="<?= $seo['lang-page'] ?? '' ?>">
-                        </div>
+                                <!-- Organization Settings -->
+                                <div>
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M4 4a2 2 0 012-2h8a2 2 0 012 2v12a1 1 0 110 2h-3a1 1 0 01-1-1v-2a1 1 0 00-1-1H9a1 1 0 00-1 1v2a1 1 0 01-1 1H4a1 1 0 110-2V4z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Organization
+                                    </h3>
+                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Organization Name</label>
+                                            <input type="text" name='jsonld[organization_name]' value="<?= htmlspecialchars($jsonld['organization_name'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Organization URL</label>
+                                            <input type="url" name='jsonld[organization_url]' value="<?= htmlspecialchars($jsonld['organization_url'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Same As URLs (one per line)</label>
+                                            <textarea name='jsonld[organization_same_as]' rows="4" 
+                                                      class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><?= htmlspecialchars($jsonld['organization_same_as'] ?? '') ?></textarea>
+                                        </div>
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">License URL</label>
+                                            <input type="url" name='jsonld[license_url]' value="<?= htmlspecialchars($jsonld['license_url'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+                                    </div>
+                                </div>
 
-                        <h3>Hreflang Settings</h3>
-                        <hr>
+                                <!-- Breadcrumb Settings -->
+                                <div>
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Breadcrumbs
+                                    </h3>
+                                    <div class="grid grid-cols-1 gap-6">
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Breadcrumb Home Name</label>
+                                            <input type="text" name='jsonld[breadcrumb_home_name]' value="<?= htmlspecialchars($jsonld['breadcrumb_home_name'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+                                    </div>
+                                </div>
 
-                        <div x-data="{ 
-                            hreflangItems: <?= htmlspecialchars(json_encode(isset($seo['hreflang']) ? json_decode($seo['hreflang'], true) ?? [] : []), ENT_QUOTES, 'UTF-8'); ?> || []
-                        }">
-                            <button type="button" @click="hreflangItems.push({ hreflang: '', href: '' })" style="background: #007bff; color: white; border: none; padding: 10px 20px; border-radius: 4px; margin-bottom: 15px; cursor: pointer; font-size: 14px;">+ Add Hreflang Item</button>
+                                <!-- Rating & Review Settings -->
+                                <div>
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Reviews & Ratings
+                                    </h3>
+                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Rating Value</label>
+                                            <input type="number" step="0.1" min="1" max="5" name='jsonld[rating_value]' value="<?= htmlspecialchars($jsonld['rating_value'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Best Rating</label>
+                                            <input type="number" name='jsonld[best_rating]' value="<?= htmlspecialchars($jsonld['best_rating'] ?? '5') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Worst Rating</label>
+                                            <input type="number" name='jsonld[worst_rating]' value="<?= htmlspecialchars($jsonld['worst_rating'] ?? '1') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Review Count</label>
+                                            <input type="number" name='jsonld[review_count]' value="<?= htmlspecialchars($jsonld['review_count'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+                                    </div>
+                                </div>
 
-                            <template x-for="(item, index) in hreflangItems" :key="index">
-                                <div style="margin-bottom: 15px; padding: 15px; border: 1px solid #ddd;">
-                                    <div style="display: grid; grid-template-columns: 1fr 1fr auto; gap: 15px; align-items: center;">
+                                <!-- Software Application Settings -->
+                                <div>
+                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
+                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Software Application
+                                    </h3>
+                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">App Name</label>
+                                            <input type="text" name='jsonld[app_name]' value="<?= htmlspecialchars($jsonld['app_name'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
+                                        <div>
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Operating System</label>
+                                            <input type="text" name='jsonld[operating_system]' value="<?= htmlspecialchars($jsonld['operating_system'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
+                                        </div>
                                         <div>
-                                            <label style="display: block; margin-bottom: 5px; font-weight: bold;">Hreflang</label>
-                                            <input type="text" x-model="item.hreflang" :name="`seo[hreflang][${index}][hreflang]`" placeholder="en, es, fr, etc." style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Application Category</label>
+                                            <input type="text" name='jsonld[application_category]' value="<?= htmlspecialchars($jsonld['application_category'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                                         </div>
                                         <div>
-                                            <label style="display: block; margin-bottom: 5px; font-weight: bold;">Href URL</label>
-                                            <input type="text" x-model="item.href" :name="`seo[hreflang][${index}][href]`" placeholder="https://example.com/en/" style="width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px;">
+                                            <label class="block text-sm font-medium text-gray-700 mb-2">Download URL</label>
+                                            <input type="url" name='jsonld[download_url]' value="<?= htmlspecialchars($jsonld['download_url'] ?? '') ?>" 
+                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
                                         </div>
-                                        <button type="button" @click="hreflangItems.splice(index, 1)" style="background: #dc3545; color: white; border: none; padding: 8px 12px; border-radius: 4px; margin-top: 25px;">Remove</button>
                                     </div>
                                 </div>
-                            </template>
-                        </div>
 
-                </div>
-                
-                <div class="form__btn-block">
-                    <button type="submit" class="form__submit">Save All Changes</button>
-                </div>
-            </form>
-        </div>
-    </div>
+                                <!-- Save Button -->
+                                <div class="pt-6 border-t border-gray-200">
+                                    <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
+                                        <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
+                                            <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
+                                        </svg>
+                                        Save JSON-LD Settings
+                                    </button>
+                                </div>
+                            </div>
+                        </div>
+                    </form>
 
-    <script src='/js/admin/scripts.js'></script>
-</body>
+<?php
+$content = ob_get_clean();
 
-</html>
+include __DIR__ . '/partials/layout.php';
+?>

+ 0 - 444
resources/view/admin/index_new.php

@@ -1,444 +0,0 @@
-<?php 
-$pageTitle = 'Site Settings - Admin Panel';
-$headerTitle = 'Site Settings';
-$activeTab = 'content';
-
-$tabs = [
-    'content' => [
-        'label' => 'Content',
-        'icon' => 'M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z'
-    ],
-    'options' => [
-        'label' => 'Options',
-        'icon' => 'M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z'
-    ],
-    'styles' => [
-        'label' => 'Styles',
-        'icon' => 'M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4z'
-    ],
-    'seo' => [
-        'label' => 'SEO & Meta',
-        'icon' => 'M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z'
-    ]
-];
-
-ob_start();
-?>
-<?php include __DIR__ . '/partials/tabs.php'; ?>
-
-<!-- Form -->
-                    <form method="POST" action="" enctype="multipart/form-data">
-                        <input type="hidden" name="form_submitted" value="1">
-
-                        <!-- Content Tab -->
-                        <div x-show="activeTab === 'content'" class="bg-white rounded-lg shadow-sm">
-                            <div class="p-6 space-y-8">
-
-                                <!-- Button Settings -->
-                                <div>
-                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
-                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
-                                            <path fill-rule="evenodd" d="M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
-                                        </svg>
-                                        Header Button Settings
-                                    </h3>
-                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Header Button Text 1</label>
-                                            <input type="text" name='content[header_btn_1]' value="<?= htmlspecialchars($content['header_btn_1'] ?? '') ?>"
-                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                        </div>
-
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Header Button Text 2</label>
-                                            <input type="text" name='content[header_btn_2]' value="<?= htmlspecialchars($content['header_btn_2'] ?? '') ?>"
-                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                        </div>
-
-                                        <div class="flex items-center lg:col-span-2">
-                                            <input type="hidden" name="content[hide-btns]" value="0">
-                                            <input type="checkbox" name="content[hide-btns]" value="1" <?= !empty($content['hide-btns']) ? 'checked' : '' ?>
-                                                   class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
-                                            <label class="ml-2 block text-sm text-gray-900">Hide header buttons</label>
-                                        </div>
-                                    </div>
-                                </div>
-
-                                <!-- Images & Media Section -->
-                                <div>
-                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
-                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
-                                            <path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"/>
-                                        </svg>
-                                        Images & Media
-                                    </h3>
-                                    
-                                    <!-- Header Logo -->
-                                    <div class="bg-gray-50 p-4 rounded-lg mb-6">
-                                        <h4 class="text-md font-medium text-gray-800 mb-4">Header Logo</h4>
-                                        <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
-                                            <div>
-                                                <?php 
-                                                $headerLogo = [];
-                                                if (isset($content['header-logo']) && !empty($content['header-logo'])) {
-                                                    $headerLogo = json_decode($content['header-logo'], true) ?: [];
-                                                }
-                                                ?>
-                                                <?php if (!empty($headerLogo['src'])): ?>
-                                                    <img class="w-24 h-24 object-cover rounded-lg border mb-2" src="../<?= $headerLogo['src'] ?>" alt="Header Logo">
-                                                <?php endif; ?>
-                                                <label class="block text-sm font-medium text-gray-700 mb-2">Upload Header Logo</label>
-                                                <input type="file" name="content[header-logo]" accept="image/*" 
-                                                       class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
-                                            </div>
-                                            <div>
-                                                <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
-                                                <input type="text" name='content[header-logo][title]' value="<?= htmlspecialchars($headerLogo['title'] ?? '') ?>" 
-                                                       class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                            <div>
-                                                <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
-                                                <input type="text" name='content[header-logo][alt]' value="<?= htmlspecialchars($headerLogo['alt'] ?? '') ?>" 
-                                                       class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-                                    </div>
-
-                                    <!-- Banner Logo -->
-                                    <div class="bg-gray-50 p-4 rounded-lg mb-6">
-                                        <h4 class="text-md font-medium text-gray-800 mb-4">Banner Image</h4>
-                                        <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
-                                            <div>
-                                                <?php 
-                                                $bannerLogo = [];
-                                                if (isset($content['banner-logo']) && !empty($content['banner-logo'])) {
-                                                    $bannerLogo = json_decode($content['banner-logo'], true) ?: [];
-                                                }
-                                                ?>
-                                                <?php if (!empty($bannerLogo['src'])): ?>
-                                                    <img class="w-full h-24 object-cover rounded-lg border mb-2" src="../<?= $bannerLogo['src'] ?>" alt="Banner Image">
-                                                <?php endif; ?>
-                                                <label class="block text-sm font-medium text-gray-700 mb-2">Upload Banner Image</label>
-                                                <input type="file" name="content[banner-logo]" accept="image/*" 
-                                                       class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
-                                            </div>
-                                            <div class="space-y-4">
-                                                <div>
-                                                    <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
-                                                    <input type="text" name='content[banner-logo][title]' value="<?= htmlspecialchars($bannerLogo['title'] ?? '') ?>" 
-                                                           class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                                </div>
-                                                <div>
-                                                    <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
-                                                    <input type="text" name='content[banner-logo][alt]' value="<?= htmlspecialchars($bannerLogo['alt'] ?? '') ?>" 
-                                                           class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                                </div>
-                                                <div class="grid grid-cols-2 gap-4">
-                                                    <div>
-                                                        <label class="block text-sm font-medium text-gray-700 mb-2">Width</label>
-                                                        <input type="text" name='content[banner-logo][width]' value="<?= htmlspecialchars($bannerLogo['width'] ?? '') ?>" 
-                                                               class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                                    </div>
-                                                    <div>
-                                                        <label class="block text-sm font-medium text-gray-700 mb-2">Height</label>
-                                                        <input type="text" name='content[banner-logo][height]' value="<?= htmlspecialchars($bannerLogo['height'] ?? '') ?>" 
-                                                               class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                                    </div>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-
-                                    <!-- Footer Logo -->
-                                    <div class="bg-gray-50 p-4 rounded-lg mb-6">
-                                        <h4 class="text-md font-medium text-gray-800 mb-4">Footer Logo</h4>
-                                        <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
-                                            <div>
-                                                <?php 
-                                                $footerLogo = [];
-                                                if (isset($content['footer-logo']) && !empty($content['footer-logo'])) {
-                                                    $footerLogo = json_decode($content['footer-logo'], true) ?: [];
-                                                }
-                                                ?>
-                                                <?php if (!empty($footerLogo['src'])): ?>
-                                                    <img class="w-24 h-24 object-cover rounded-lg border mb-2" src="../<?= $footerLogo['src'] ?>" alt="Footer Logo">
-                                                <?php endif; ?>
-                                                <label class="block text-sm font-medium text-gray-700 mb-2">Upload Footer Logo</label>
-                                                <input type="file" name="content[footer-logo]" accept="image/*" 
-                                                       class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
-                                            </div>
-                                            <div>
-                                                <label class="block text-sm font-medium text-gray-700 mb-2">Title</label>
-                                                <input type="text" name='content[footer-logo][title]' value="<?= htmlspecialchars($footerLogo['title'] ?? '') ?>" 
-                                                       class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                            <div>
-                                                <label class="block text-sm font-medium text-gray-700 mb-2">Alt Text</label>
-                                                <input type="text" name='content[footer-logo][alt]' value="<?= htmlspecialchars($footerLogo['alt'] ?? '') ?>" 
-                                                       class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-                                    </div>
-
-                                    <!-- Other Images -->
-                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
-                                        <div class="bg-gray-50 p-4 rounded-lg">
-                                            <h4 class="text-md font-medium text-gray-800 mb-4">Favicon</h4>
-                                            <?php if (!empty($content['favicon'])): ?>
-                                                <img class="w-16 h-16 object-cover rounded border mb-2" src="../<?= $content['favicon'] ?>" alt="Favicon">
-                                            <?php endif; ?>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Upload Favicon</label>
-                                            <input type="file" name="content[favicon]" accept="image/*"
-                                                   class="w-full text-sm text-gray-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100">
-                                        </div>
-                                    </div>
-                                </div>
-
-                                <!-- Footer Settings -->
-                                <div>
-                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
-                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
-                                            <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/>
-                                        </svg>
-                                        Footer Content
-                                    </h3>
-                                    <div class="grid grid-cols-1 gap-6">
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Footer Text</label>
-                                            <textarea name='content[footer__text]' rows="4" 
-                                                      class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><?= htmlspecialchars($content['footer__text'] ?? '') ?></textarea>
-                                        </div>
-
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Copyright</label>
-                                            <textarea name='content[copyright]' rows="2" 
-                                                      class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"><?= htmlspecialchars($content['copyright'] ?? '') ?></textarea>
-                                        </div>
-                                    </div>
-                                </div>
-
-                                <!-- Save Button -->
-                                <div class="pt-6 border-t border-gray-200">
-                                    <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
-                                        <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
-                                            <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
-                                        </svg>
-                                        Save Changes
-                                    </button>
-                                </div>
-                            </div>
-                        </div>
-
-                        <!-- Options Tab -->
-                        <div x-show="activeTab === 'options'" class="bg-white rounded-lg shadow-sm">
-                            <div class="p-6 space-y-8">
-                                
-                                <!-- Hash Fields Section -->
-                                <div>
-                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
-                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
-                                            <path fill-rule="evenodd" d="M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z" clip-rule="evenodd"/>
-                                        </svg>
-                                        Hash Fields
-                                    </h3>
-                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash</label>
-                                            <input type="text" name='content[hash]' value="<?= htmlspecialchars($content['hash'] ?? '') ?>" 
-                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                        </div>
-
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 1</label>
-                                            <input type="text" name='content[hash-1]' value="<?= htmlspecialchars($content['hash-1'] ?? '') ?>" 
-                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                        </div>
-
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 2</label>
-                                            <input type="text" name='content[hash-2]' value="<?= htmlspecialchars($content['hash-2'] ?? '') ?>" 
-                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                        </div>
-
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 3</label>
-                                            <input type="text" name='content[hash-3]' value="<?= htmlspecialchars($content['hash-3'] ?? '') ?>" 
-                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                        </div>
-
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 4</label>
-                                            <input type="text" name='content[hash-4]' value="<?= htmlspecialchars($content['hash-4'] ?? '') ?>" 
-                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                        </div>
-
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Hash 5</label>
-                                            <input type="text" name='content[hash-5]' value="<?= htmlspecialchars($content['hash-5'] ?? '') ?>" 
-                                                   class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                        </div>
-                                    </div>
-                                </div>
-
-                                <!-- Save Button -->
-                                <div class="pt-6 border-t border-gray-200">
-                                    <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
-                                        <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
-                                            <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
-                                        </svg>
-                                        Save Changes
-                                    </button>
-                                </div>
-                            </div>
-                        </div>
-
-                        <!-- Styles Tab -->
-                        <div x-show="activeTab === 'styles'" class="bg-white rounded-lg shadow-sm">
-                            <div class="p-6 space-y-8">
-
-                                <!-- Color Settings Section -->
-                                <div>
-                                    <h3 class="text-lg font-medium text-gray-900 mb-6 flex items-center">
-                                        <svg class="w-5 h-5 mr-2 text-blue-600" fill="currentColor" viewBox="0 0 20 20">
-                                            <path fill-rule="evenodd" d="M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4z" clip-rule="evenodd"/>
-                                        </svg>
-                                        Цветовые настройки
-                                    </h3>
-                                    <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
-                                        <!-- Цвет хедера -->
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет хедера (шапки сайта)</label>
-                                            <div class="flex gap-3">
-                                                <input type="color" value="<?= $styles['header_color'] ?? '#1E1E1E' ?>"
-                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
-                                                       onchange="this.nextElementSibling.value = this.value">
-                                                <input type="text" name='styles[header_color]' value="<?= htmlspecialchars($styles['header_color'] ?? '') ?>"
-                                                       placeholder="#1E1E1E"
-                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-
-                                        <!-- Цвет body (фон) -->
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет body (фон сайта)</label>
-                                            <div class="flex gap-3">
-                                                <input type="color" value="<?= $styles['body_bg_color'] ?? '#0A0A0A' ?>"
-                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
-                                                       onchange="this.nextElementSibling.value = this.value">
-                                                <input type="text" name='styles[body_bg_color]' value="<?= htmlspecialchars($styles['body_bg_color'] ?? '') ?>"
-                                                       placeholder="#0A0A0A"
-                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-
-                                        <!-- Цвет контентной части -->
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет контентной части</label>
-                                            <div class="flex gap-3">
-                                                <input type="color" value="<?= $styles['content_bg_color'] ?? '#1A1A1A' ?>"
-                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
-                                                       onchange="this.nextElementSibling.value = this.value">
-                                                <input type="text" name='styles[content_bg_color]' value="<?= htmlspecialchars($styles['content_bg_color'] ?? '') ?>"
-                                                       placeholder="#1A1A1A"
-                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-
-                                        <!-- Цвет текста основного -->
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет текста основного</label>
-                                            <div class="flex gap-3">
-                                                <input type="color" value="<?= $styles['text_color'] ?? '#FFFFFF' ?>"
-                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
-                                                       onchange="this.nextElementSibling.value = this.value">
-                                                <input type="text" name='styles[text_color]' value="<?= htmlspecialchars($styles['text_color'] ?? '') ?>"
-                                                       placeholder="#FFFFFF"
-                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-
-                                        <!-- Цвет текста ссылок в контенте -->
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет текста ссылок в контенте</label>
-                                            <div class="flex gap-3">
-                                                <input type="color" value="<?= $styles['link_color'] ?? '#4A9EFF' ?>"
-                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
-                                                       onchange="this.nextElementSibling.value = this.value">
-                                                <input type="text" name='styles[link_color]' value="<?= htmlspecialchars($styles['link_color'] ?? '') ?>"
-                                                       placeholder="#4A9EFF"
-                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-
-                                        <!-- Цвет таблицы -->
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет таблицы (фон)</label>
-                                            <div class="flex gap-3">
-                                                <input type="color" value="<?= $styles['table_bg_color'] ?? '#1A1A1A' ?>"
-                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
-                                                       onchange="this.nextElementSibling.value = this.value">
-                                                <input type="text" name='styles[table_bg_color]' value="<?= htmlspecialchars($styles['table_bg_color'] ?? '') ?>"
-                                                       placeholder="#1A1A1A"
-                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-
-                                        <!-- Цвет шапки таблицы -->
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет шапки таблицы (thead)</label>
-                                            <div class="flex gap-3">
-                                                <input type="color" value="<?= $styles['table_header_color'] ?? '#2A2A2A' ?>"
-                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
-                                                       onchange="this.nextElementSibling.value = this.value">
-                                                <input type="text" name='styles[table_header_color]' value="<?= htmlspecialchars($styles['table_header_color'] ?? '') ?>"
-                                                       placeholder="#2A2A2A"
-                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-
-                                        <!-- Цвет фона футера -->
-                                        <div>
-                                            <label class="block text-sm font-medium text-gray-700 mb-2">Цвет фона футера</label>
-                                            <div class="flex gap-3">
-                                                <input type="color" value="<?= $styles['footer_bg_color'] ?? '#1E1E1E' ?>"
-                                                       class="w-12 h-10 rounded border border-gray-300 cursor-pointer"
-                                                       onchange="this.nextElementSibling.value = this.value">
-                                                <input type="text" name='styles[footer_bg_color]' value="<?= htmlspecialchars($styles['footer_bg_color'] ?? '') ?>"
-                                                       placeholder="#1E1E1E"
-                                                       class="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-
-                                <!-- Save Button -->
-                                <div class="pt-6 border-t border-gray-200">
-                                    <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
-                                        <svg class="w-5 h-5 mr-2" fill="currentColor" viewBox="0 0 20 20">
-                                            <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/>
-                                        </svg>
-                                        Сохранить изменения
-                                    </button>
-                                </div>
-                            </div>
-                        </div>
-
-                        <!-- SEO Tab -->
-                        <div x-show="activeTab === 'seo'" class="bg-white rounded-lg shadow-sm">
-                            <div class="p-6">
-                                <div class="text-center py-12">
-                                    <svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
-                                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/>
-                                    </svg>
-                                    <h3 class="mt-2 text-sm font-medium text-gray-900">SEO Coming Soon</h3>
-                                    <p class="mt-1 text-sm text-gray-500">SEO settings will be implemented in the next update.</p>
-                                </div>
-                            </div>
-                        </div>
-                    </form>
-
-<?php
-$content = ob_get_clean();
-
-include __DIR__ . '/partials/layout.php';
-?>

+ 34 - 20
resources/view/partials/schema.php

@@ -1,16 +1,31 @@
 <?php
+$settingsJsonld = settings('jsonld')->getAll();
 $schemaGraph = [];
 
 // 1. Organization
-$schemaGraph[] = [
+$organizationSchema = [
     "@type" => "Organization",
     "@id" => $currentUrl . "#organization",
-    "name" => $seo['title'] ?? $pageContent['title'],
-    "url" => $currentDomain,
-    "logo" => !empty($settingsContent['header-logo']) ? $currentDomain . '/' . json_decode($settingsContent['header-logo'], true)['src'] : '',
-    "sameAs" => !empty($settingsContent['official-sites']) ? json_decode($settingsContent['official-sites'], true) : []
+    "name" => $settingsJsonld['organization_name'] ?? ($seo['title'] ?? $pageContent['title']),
+    "url" => $settingsJsonld['organization_url'] ?? $currentDomain,
+    "logo" => !empty($settingsContent['header-logo']) ? $currentDomain . '/' . json_decode($settingsContent['header-logo'], true)['src'] : ''
 ];
 
+// Add sameAs if organization_same_as is filled
+if (!empty($settingsJsonld['organization_same_as'])) {
+    $sameAsUrls = array_filter(array_map('trim', explode("\n", $settingsJsonld['organization_same_as'])));
+    if (!empty($sameAsUrls)) {
+        $organizationSchema["sameAs"] = $sameAsUrls;
+    }
+}
+
+// Add license if filled
+if (!empty($settingsJsonld['license_url'])) {
+    $organizationSchema["license"] = $settingsJsonld['license_url'];
+}
+
+$schemaGraph[] = $organizationSchema;
+
 // 2. Casino Brand
 $casinoBrand = [
     "@type" => ["Casino", "Brand"],
@@ -20,10 +35,10 @@ $casinoBrand = [
     "image" => !empty($settingsContent['header-logo']) ? $currentDomain . '/' . json_decode($settingsContent['header-logo'], true)['src'] : '',
     "aggregateRating" => [
         "@type" => "AggregateRating",
-        "ratingValue" => "5",
-        "ratingCount" => $settingsContent['rating-count'] ?? "150",
-        "worstRating" => "1",
-        "bestRating" => "5"
+        "ratingValue" => $settingsJsonld['rating_value'] ?? "5",
+        "ratingCount" => $settingsJsonld['review_count'] ?? "150",
+        "worstRating" => $settingsJsonld['worst_rating'] ?? "1",
+        "bestRating" => $settingsJsonld['best_rating'] ?? "5"
     ],
     "priceRange" => "$",
     "openingHoursSpecification" => [
@@ -129,7 +144,7 @@ $schemaGraph[] = [
         [
             "@type" => "ListItem",
             "position" => 1,
-            "name" => $settingsContent['title-h1'],
+            "name" => $settingsJsonld['breadcrumb_home_name'] ?? $settingsContent['title-h1'],
             "item" => $currentUrl
         ]
     ]
@@ -156,13 +171,13 @@ if (!empty($faqItems)) {
 }
 
 // 9. SoftwareApplication (if app fields are filled)
-if (!empty($settingsContent['app-download-url']) || !empty($settingsContent['app-install-url'])) {
+if (!empty($settingsJsonld['download_url']) || !empty($settingsJsonld['app_name'])) {
     $schemaGraph[] = [
         "@type" => "SoftwareApplication",
         "@id" => $currentUrl . "#app",
-        "name" => $settingsContent['title-h1'] . " App",
-        "operatingSystem" => "Android, iOS",
-        "applicationCategory" => "GameApplication",
+        "name" => $settingsJsonld['app_name'] ?? ($settingsContent['title-h1'] . " App"),
+        "operatingSystem" => $settingsJsonld['operating_system'] ?? "Android, iOS",
+        "applicationCategory" => $settingsJsonld['application_category'] ?? "GameApplication",
         "provider" => [
             "@id" => $currentUrl . "#organization"
         ],
@@ -172,14 +187,13 @@ if (!empty($settingsContent['app-download-url']) || !empty($settingsContent['app
             "priceCurrency" => "EUR",
             "availability" => "https://schema.org/InStock"
         ],
-        "downloadUrl" => $settingsContent['app-download-url'] ?? '',
-        "installUrl" => $settingsContent['app-install-url'] ?? '',
+        "downloadUrl" => $settingsJsonld['download_url'] ?? '',
         "aggregateRating" => [
             "@type" => "AggregateRating",
-            "ratingValue" => "5",
-            "ratingCount" => $settingsContent['app-rating-count'] ?? "99",
-            "worstRating" => "1",
-            "bestRating" => "5"
+            "ratingValue" => $settingsJsonld['rating_value'] ?? "5",
+            "ratingCount" => $settingsJsonld['review_count'] ?? "99",
+            "worstRating" => $settingsJsonld['worst_rating'] ?? "1",
+            "bestRating" => $settingsJsonld['best_rating'] ?? "5"
         ],
         "author" => [
             "@id" => $currentUrl . "#organization"

+ 10 - 1
src/Pages/admin/index.php

@@ -39,6 +39,14 @@ if (isset($_POST['form_submitted']) && $_POST['form_submitted'] == '1') {
         }
     }
     
+    // Сохранение jsonld данных
+    if (isset($_POST['jsonld'])) {
+        $jsonldSettings = settings('jsonld');
+        foreach ($_POST['jsonld'] as $key => $value) {
+            $jsonldSettings->set($key, $value);
+        }
+    }
+    
     // Обработка загрузки og-image
     if (isset($_FILES['seo'])) {
         $imagePath = uploadImage($_FILES['seo'], 'og-image');
@@ -127,10 +135,11 @@ if (isset($content['casino_list']) && !empty($content['casino_list'])) {
     $casinoItems = [];
 }
 
-return ViewRender('admin/index_new.php', [
+return ViewRender('admin/index.php', [
     'content' => $content,
     'styles' => $styles,
     'seo' => settings('seo')->getAll(),
+    'jsonld' => settings('jsonld')->getAll(),
     'faqItems' => $faqItems,
     'menuItems' => $menuItems,
     'casinoItems' => $casinoItems

+ 17 - 4
src/Pages/page.php

@@ -13,8 +13,14 @@ $faqModel = new Faq();
 // Получаем slug из URL
 $slug = $slug ?? $_GET['slug'] ?? '';
 
-// Находим страницу по slug
-$currentPage = \db()->fetchOne("SELECT * FROM pages WHERE slug = ? AND is_homepage = 0", [$slug]);
+// Находим страницу по slug или главную страницу если slug пустой
+if (empty($slug)) {
+    // Главная страница
+    $currentPage = \db()->fetchOne("SELECT * FROM pages WHERE is_homepage = 1");
+} else {
+    // Обычная страница по slug
+    $currentPage = \db()->fetchOne("SELECT * FROM pages WHERE slug = ?", [$slug]);
+}
 
 // Если страница не найдена, возвращаем 404
 if (!$currentPage) {
@@ -43,7 +49,14 @@ $currentUrl = getCurrentUrl();
 
 // Определение типа пользователя
 $ip = getUserIp();
-$isSearchBot = preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'] ?? '');
+$isGoogleBot = (strpos(gethostbyaddr($ip), 'google') !== false)
+    ? true
+    : false;
+$isBingBot = (strpos(gethostbyaddr($ip), 'bing') !== false)
+    ? true
+    : false;
+
+$isSearchBot = $isGoogleBot || $isBingBot;
 
 // Определяем лейаут страницы
 $layout = \App\Enums\PageLayout::tryFrom($currentPage['layout'] ?? 'default') ?? \App\Enums\PageLayout::Default;
@@ -58,7 +71,7 @@ return ViewRender($layoutFile, [
     'topContent' => $topContent,
     'currentDomain' => $currentDomain,
     'currentUrl' => $currentUrl,
-    'isHomepage' => false,
+    'isHomepage' => !empty($currentPage['is_homepage']),
     'isSearchBot' => $isSearchBot,
     'userIp' => $ip,
 ]);