#!/usr/bin/env bash
set -Eeuo pipefail
APP='/home/itouchdigitalin/auctionworld_app'
WEB='/home/itouchdigitalin/public_html/auctionworld'
STAMP="$(date +%Y%m%d_%H%M%S)"
echo '=== AUCTION WORLD | PHASE 03 | PREMIUM CRICKET UI ==='
[[ "$(id -un)" == 'itouchdigitalin' || "$(id -un)" == 'root' ]] || { echo 'STOP: run as account user or root'; exit 1; }
[[ -f "$APP/artisan" && -f "$APP/routes/web.php" && -f "$WEB/index.php" ]] || { echo 'STOP: Expected Laravel files missing'; exit 1; }
[[ ! -L "$WEB" && ! -L "$APP" ]] || { echo 'STOP: Unexpected symlink'; exit 1; }
if command -v grep >/dev/null; then
 ROOT="$(grep -E '^[[:space:]]*documentroot:' /var/cpanel/userdata/itouchdigitalin/auctionworld.itouchdigital.in 2>/dev/null | head -1 | sed -E 's/^[[:space:]]*documentroot:[[:space:]]*//')"
 [[ "$ROOT" == "$WEB" ]] || { echo "STOP: Document root mismatch: $ROOT"; exit 1; }
fi
BACKUP="/home/itouchdigitalin/auctionworld_phase03_backup_${STAMP}"
mkdir -m 700 "$BACKUP"
cp -p "$APP/routes/web.php" "$BACKUP/web.php"
[[ ! -e "$APP/resources/views/auctionworld-home.blade.php" ]] || cp -p "$APP/resources/views/auctionworld-home.blade.php" "$BACKUP/auctionworld-home.blade.php"
[[ ! -e "$WEB/auctionworld-ui.css" ]] || cp -p "$WEB/auctionworld-ui.css" "$BACKUP/auctionworld-ui.css"
[[ ! -e "$WEB/auctionworld-ui.js" ]] || cp -p "$WEB/auctionworld-ui.js" "$BACKUP/auctionworld-ui.js"
TMP="$(mktemp -d /home/itouchdigitalin/.aw_phase03.XXXXXX)"
trap 'rm -rf "$TMP"' EXIT
cat > "$TMP/web.php" <<'PHP'
<?php

use Illuminate\Support\Facades\Route;

Route::view('/', 'auctionworld-home');
Route::get('/up', fn () => response('OK', 200));
PHP
cat > "$TMP/home.blade.php" <<'HTML'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="#0c1427"><meta name="description" content="Auction World — a premium live cricket auction platform for leagues and tournaments.">
<title>Auction World | Cricket Auction Platform</title>
<link rel="stylesheet" href="/auctionworld-ui.css?v=3">
</head>
<body>
<a class="skip" href="#main">Skip to content</a>
<header class="nav"><a class="brand" href="/" aria-label="Auction World home"><span class="brand-icon">AW</span><span>AUCTION <b>WORLD</b></span></a><nav aria-label="Main navigation"><a href="#features">Features</a><a href="#how">How it works</a><a href="#experience">Experience</a></nav><a class="nav-cta" href="#contact">Get started <span aria-hidden="true">↗</span></a></header>
<main id="main"><section class="hero"><div class="hero-glow"></div><div class="hero-copy"><div class="eyebrow"><span class="live-dot"></span> THE FUTURE OF CRICKET AUCTIONS</div><h1>Every great team<br>starts with a <em>winning bid.</em></h1><p>One premium platform to manage cricket tournaments, register players, build teams and bring the auction arena to life.</p><div class="actions"><a class="btn gold" href="#features">Explore platform <span>↗</span></a><a class="btn outline" href="#experience">View experience <span>↘</span></a></div><div class="hero-metrics"><div><strong>01</strong><small>Unified platform</small></div><div><strong>24/7</strong><small>Digital access</small></div><div><strong>LIVE</strong><small>Auction experience</small></div></div></div><div class="hero-visual" aria-label="Decorative 3D-style cricket ball illustration"><div class="orbit orbit-one"></div><div class="orbit orbit-two"></div><div class="cricket-ball"><span class="seam seam-a"></span><span class="seam seam-b"></span></div><div class="visual-caption"><span class="pulse"></span> THE AUCTION ARENA <b>IS YOURS</b></div><div class="floor"></div></div></section>
<section class="section intro" id="features"><div class="section-heading"><span class="kicker">BUILT FOR THE BIG MOMENTS</span><h2>From registration to <span>the final bid.</span></h2><p>Everything a cricket tournament organizer needs, beautifully connected in one place.</p></div><div class="features"><article class="feature"><div class="feature-icon">◈</div><h3>Tournament Control</h3><p>Set up tournaments, teams, auction rules and schedules in one organized workspace.</p><span>01 / ORGANIZE</span></article><article class="feature"><div class="feature-icon">◎</div><h3>Player Registration</h3><p>Share registration links, collect player profiles and manage approvals with ease.</p><span>02 / REGISTER</span></article><article class="feature"><div class="feature-icon">↗</div><h3>Live Bidding</h3><p>Plan real-time bidding, team budgets, sold players and a spectator-ready display.</p><span>03 / COMPETE</span></article></div></section>
<section class="section how" id="how"><div class="how-copy"><span class="kicker">THE SIMPLE GAME PLAN</span><h2>One platform.<br><span>Every auction moment.</span></h2><p>Designed for organizers, captains and fans — each with a purpose-built experience.</p><div class="steps"><div><b>01</b><span>Create your tournament</span></div><div><b>02</b><span>Invite teams & register players</span></div><div><b>03</b><span>Run your live auction</span></div></div></div><div class="display" id="experience"><div class="display-top"><span class="dot-group">● ● ●</span><span>AUCTION WORLD / PREVIEW</span><span class="status">● DESIGN CONCEPT</span></div><div class="display-body"><div class="player-card"><div class="player-avatar">11</div><small>PLAYER SPOTLIGHT</small><h3>THE NEXT<br>BIG PICK</h3><span>ALL-ROUNDER</span></div><div class="bid-card"><span class="bid-label">LIVE AUCTION CONCEPT</span><div class="bid-amount">₹ 12,500</div><div class="bid-line"><span>Current bid</span><b>TEAM GOLD</b></div><div class="progress"><span></span></div><div class="bid-bottom"><span>03 TEAMS ACTIVE</span><b>00:18</b></div></div></div><div class="display-foot">ILLUSTRATIVE UI — LIVE BIDDING NOT ENABLED YET</div></div></section>
<section class="closing" id="contact"><div class="closing-orb"></div><span class="kicker">AUCTION WORLD</span><h2>Build the team.<br><em>Own the moment.</em></h2><p>Cricket auctions, reimagined for the next generation of tournaments.</p><span class="coming">PLATFORM DEVELOPMENT IN PROGRESS</span></section></main>
<footer><span>© {{ date('Y') }} AUCTION WORLD</span><span>CRICKET FIRST. BUILT FOR MORE.</span></footer>
<script src="/auctionworld-ui.js?v=3" defer></script>
</body></html>
HTML
cat > "$TMP/ui.css" <<'CSS'
:root{color-scheme:dark;--navy:#0c1427;--navy2:#101d35;--gold:#e8bc67;--text:#f7f6f2;--muted:#b1b8c9;--line:rgba(255,255,255,.12)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--navy);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}a{color:inherit;text-decoration:none}.skip{position:absolute;top:-100px;left:10px;background:#fff;color:#000;padding:10px;z-index:100}.skip:focus{top:10px}.nav{height:86px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 clamp(24px,6vw,100px);border-bottom:1px solid var(--line);position:relative;z-index:4;background:#0c1427ee}.brand{display:flex;align-items:center;gap:12px;font-size:18px;font-weight:800;letter-spacing:1.2px;white-space:nowrap}.brand b{color:var(--gold)}.brand-icon{height:42px;width:42px;display:grid;place-items:center;border:1px solid var(--gold);border-radius:12px;color:var(--gold);font-size:15px}.nav nav{display:flex;gap:35px;color:#c9ced8;font-size:13px}.nav nav a:hover{color:var(--gold)}.nav-cta{padding:13px 22px;border:1px solid #a78c5d;border-radius:8px;color:var(--gold);font-weight:700;font-size:13px}.hero{min-height:680px;position:relative;overflow:hidden;display:grid;grid-template-columns:1.05fr .95fr;align-items:center;padding:60px clamp(24px,7vw,110px);background:radial-gradient(ellipse at 80% 45%,#1e304f 0%,#101c32 38%,#0c1427 72%)}.hero:before{content:"";position:absolute;inset:0;opacity:.16;background-image:linear-gradient(#ffffff12 1px,transparent 1px),linear-gradient(90deg,#ffffff12 1px,transparent 1px);background-size:55px 55px;mask-image:linear-gradient(90deg,transparent,#000)}.hero-copy{position:relative;z-index:2;max-width:650px}.eyebrow,.kicker{font-size:11px;letter-spacing:2.7px;color:var(--gold);font-weight:800}.live-dot,.pulse{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--gold);margin-right:10px;box-shadow:0 0 15px var(--gold);animation:blink 2s infinite}.hero h1{font-size:clamp(42px,5.4vw,82px);letter-spacing:-3px;line-height:1.07;margin:27px 0}.hero h1 em,.closing h2 em{font-style:normal;color:var(--gold)}.hero p{color:var(--muted);line-height:1.85;max-width:530px;font-size:16px}.actions{display:flex;gap:14px;flex-wrap:wrap;margin:35px 0 50px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:30px;padding:17px 24px;border-radius:9px;font-size:13px;font-weight:800;transition:transform .25s,background .25s}.btn:hover{transform:translateY(-4px)}.gold{background:var(--gold);color:#111c30}.outline{border:1px solid #ffffff55}.hero-metrics{display:flex;gap:38px;flex-wrap:wrap}.hero-metrics div{display:flex;flex-direction:column;gap:6px;border-left:1px solid #ffffff33;padding-left:18px}.hero-metrics strong{font-size:22px;color:var(--gold)}.hero-metrics small{font-size:11px;color:#aab4c4}.hero-visual{min-height:560px;display:grid;place-items:center;position:relative;perspective:900px;isolation:isolate}.cricket-ball{width:min(29vw,360px);height:min(29vw,360px);min-width:240px;min-height:240px;border-radius:50%;position:relative;overflow:hidden;transform:rotate(-25deg);background:radial-gradient(circle at 28% 23%,#ff9b77,#bb342c 35%,#7e151f 70%,#370b18 100%);box-shadow:inset -32px -34px 50px #230714a8,inset 14px 12px 30px #ffc5a144,0 30px 90px #000b,0 0 120px #e6a85322;animation:float 6s ease-in-out infinite}.cricket-ball:before{content:"";position:absolute;inset:0;border-radius:50%;background:repeating-linear-gradient(110deg,transparent 0 5px,#ffffff05 6px 7px);opacity:.45}.seam{position:absolute;left:47%;top:-20%;height:140%;width:16px;border-left:3px dashed #ffe2bc;border-right:3px dashed #ffe2bc;transform:rotate(23deg);filter:drop-shadow(1px 1px 2px #571b1b)}.seam-b{left:53%;opacity:.35;transform:rotate(23deg) translateX(9px)}.orbit{position:absolute;width:94%;height:57%;border:1px solid #d9b56d55;border-radius:50%;transform:rotate(-26deg);box-shadow:0 0 25px #e8bc6710;animation:orbit 14s linear infinite}.orbit-two{width:110%;height:70%;transform:rotate(39deg);border-color:#ffffff22;animation-duration:18s;animation-direction:reverse}.floor{position:absolute;bottom:60px;width:65%;height:35px;border-radius:50%;background:#d1a65b44;filter:blur(30px);z-index:-1}.visual-caption{position:absolute;bottom:18px;letter-spacing:2px;font-size:11px;color:#d6dbe7}.visual-caption b{color:var(--gold)}.section{padding:110px clamp(24px,7vw,110px)}.intro{background:#f7f6f2;color:#101c30}.section-heading{text-align:center;max-width:760px;margin:0 auto 55px}.section-heading h2,.how h2{font-size:clamp(34px,4vw,57px);line-height:1.12;letter-spacing:-2px;margin:18px 0}.section-heading h2 span,.how h2 span{color:#b48b43}.section-heading p{color:#6c7480;line-height:1.7}.features{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.feature{border:1px solid #dfe1e4;background:#fff;border-radius:18px;padding:35px;min-height:290px;box-shadow:0 18px 60px #0e1d3410;transition:transform .3s,box-shadow .3s}.feature:hover{transform:translateY(-8px);box-shadow:0 25px 70px #0e1d3420}.feature-icon{width:56px;height:56px;border-radius:15px;background:#f9f1e1;color:#a77d36;display:grid;place-items:center;font-size:32px}.feature h3{margin:25px 0 12px;font-size:21px}.feature p{font-size:14px;color:#697180;line-height:1.75}.feature>span{display:block;margin-top:26px;font-size:10px;letter-spacing:1.5px;color:#b48b43;font-weight:800}.how{display:grid;grid-template-columns:.9fr 1.1fr;gap:7vw;align-items:center;background:#101d35}.how h2 span{color:var(--gold)}.how-copy>p{color:var(--muted);line-height:1.8}.steps{margin-top:38px}.steps div{display:flex;align-items:center;gap:20px;padding:19px 0;border-bottom:1px solid var(--line);font-size:15px}.steps b{color:var(--gold);font-size:12px}.display{border:1px solid #d6b57766;border-radius:20px;background:#0a1223;box-shadow:0 40px 90px #0006;overflow:hidden;transform:perspective(1100px) rotateY(-4deg);transition:transform .5s}.display:hover{transform:perspective(1100px) rotateY(0)}.display-top,.display-foot{display:flex;justify-content:space-between;gap:8px;padding:16px 20px;font-size:9px;letter-spacing:1px;color:#b4bccc;border-bottom:1px solid var(--line)}.dot-group{color:#dcbd7d}.status{color:#e6bc6b}.display-body{display:grid;grid-template-columns:.8fr 1.2fr;gap:18px;padding:24px}.player-card{background:linear-gradient(145deg,#1e344e,#101b2d);border:1px solid #ffffff19;border-radius:12px;padding:22px;min-height:300px}.player-avatar{width:100px;height:100px;border-radius:50%;margin:0 auto 22px;display:grid;place-items:center;font-size:60px;font-weight:900;color:#ffffff18;background:linear-gradient(135deg,#bca16e,#5e6675)}.player-card small,.bid-label{font-size:9px;letter-spacing:1.3px;color:var(--gold)}.player-card h3{font-size:25px;line-height:1.05;margin:12px 0}.player-card>span{font-size:10px;color:#b7c3d3}.bid-card{padding:22px;border:1px solid #ffffff19;border-radius:12px;background:#13213a}.bid-amount{font-size:clamp(25px,3vw,48px);font-weight:900;color:var(--gold);margin:28px 0}.bid-line,.bid-bottom{display:flex;justify-content:space-between;gap:12px;font-size:10px;color:#b9c4d4}.bid-line b{color:#fff}.progress{height:5px;background:#ffffff19;border-radius:10px;margin:35px 0 20px;overflow:hidden}.progress span{display:block;width:68%;height:100%;background:var(--gold);animation:progress 3s ease-in-out infinite alternate}.bid-bottom b{color:var(--gold)}.display-foot{border-top:1px solid var(--line);border-bottom:0;justify-content:center;color:#8290a8}.closing{position:relative;text-align:center;padding:125px 24px;overflow:hidden;background:radial-gradient(ellipse at 50% 30%,#263957,#0c1427 65%)}.closing h2{font-size:clamp(48px,6vw,82px);line-height:1.1;letter-spacing:-3px;margin:25px 0}.closing p{color:var(--muted)}.coming{display:inline-block;margin-top:30px;padding:13px 23px;border:1px solid #c49b5877;border-radius:30px;color:var(--gold);font-size:11px;letter-spacing:1.2px}footer{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:30px clamp(24px,7vw,110px);font-size:11px;letter-spacing:1.4px;color:#a7b1c2;border-top:1px solid var(--line)}.reveal{opacity:0;transform:translateY(22px);transition:opacity .65s,transform .65s}.reveal.visible{opacity:1;transform:translateY(0)}@keyframes float{50%{transform:translateY(-24px) rotate(-17deg)}}@keyframes orbit{50%{transform:rotate(120deg)}}@keyframes blink{50%{opacity:.35}}@keyframes progress{to{width:83%}}@media(max-width:960px){.nav nav{display:none}.hero{grid-template-columns:1fr;padding-top:70px}.hero-visual{min-height:400px}.cricket-ball{width:280px;height:280px}.features,.how{grid-template-columns:1fr}.how{gap:60px}.display{transform:none}.section{padding:75px 24px}}@media(max-width:520px){.nav{height:70px;padding:0 18px}.brand{font-size:13px}.brand-icon{width:34px;height:34px;font-size:12px}.nav-cta{padding:10px;font-size:11px}.hero{padding:60px 22px}.hero h1{letter-spacing:-1.6px}.hero-metrics{gap:15px}.hero-metrics strong{font-size:17px}.hero-visual{min-height:350px}.cricket-ball{min-width:210px;min-height:210px;width:220px;height:220px}.orbit{width:100%}.visual-caption{font-size:8px}.display-body{padding:10px;gap:8px}.player-card,.bid-card{padding:12px;min-height:230px}.player-avatar{width:65px;height:65px;font-size:38px}.player-card h3{font-size:17px}.bid-amount{font-size:22px}.display-top{font-size:7px;padding:12px}.display-top .status{display:none}.closing h2{letter-spacing:-1px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important;transition:none!important}.reveal{opacity:1;transform:none}}
CSS
cat > "$TMP/ui.js" <<'JS'
(()=>{if(!('IntersectionObserver'in window))return;const els=document.querySelectorAll('.feature,.section-heading,.how-copy,.display');els.forEach(el=>el.classList.add('reveal'));const obs=new IntersectionObserver(entries=>{entries.forEach(entry=>{if(entry.isIntersecting){entry.target.classList.add('visible');obs.unobserve(entry.target)}})},{threshold:.12});els.forEach(el=>obs.observe(el));})();
JS
php -l "$TMP/web.php"
php -l "$TMP/home.blade.php"
install -m 644 "$TMP/home.blade.php" "$APP/resources/views/auctionworld-home.blade.php"
install -m 644 "$TMP/ui.css" "$WEB/auctionworld-ui.css"
install -m 644 "$TMP/ui.js" "$WEB/auctionworld-ui.js"
install -m 644 "$TMP/web.php" "$APP/routes/web.php"
if [[ "$(id -un)" == 'root' ]]; then
 chown itouchdigitalin:itouchdigitalin "$APP/routes/web.php" "$APP/resources/views/auctionworld-home.blade.php" "$WEB/auctionworld-ui.css" "$WEB/auctionworld-ui.js"
fi
cd "$APP"
if [[ "$(id -un)" == 'root' ]]; then
 su -s /bin/bash itouchdigitalin -c "cd '$APP' && php artisan optimize:clear && php artisan route:list --path=/"
else
 php artisan optimize:clear
 php artisan route:list --path=/
fi
printf '\nWebsite status: '
curl -sS -o /dev/null -w '%{http_code}\n' https://auctionworld.itouchdigital.in/ || true
printf 'CSS status: '
curl -sS -o /dev/null -w '%{http_code}\n' https://auctionworld.itouchdigital.in/auctionworld-ui.css || true
printf 'Backup folder: %s\n' "$BACKUP"
echo '=== PHASE 03 COMPLETE ==='
