Certainly! Here's an upgraded, full screen, dark-themed, elegant, and more polished version of your home.php. It features smooth gradients, subtle shadows, a modern font usage, refined spacing, and a refined floating animation.
The CSS remains scoped inside #home-page so it won't interfere with the rest of your site when included in your existing layout.
<?php
// home.php - elegant full screen dark theme hero with search
?>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&display=swap');
/* Reset */
#home-page *,
#home-page *::before,
#home-page *::after {
box-sizing: border-box;
}
#home-page {
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 100%);
color: #e0e7ff;
min-height: 100vh;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
padding: 0 20px; /* some side padding for small screens */
}
/* Container with 3D perspective */
#home-page .hero-section {
width: 100%;
max-width: 900px;
perspective: 1600px;
perspective-origin: center center;
text-align: center;
}
#home-page .hero-inner {
background: linear-gradient(135deg, #12142b 0%, #252945 100%);
border-radius: 24px;
padding: 80px 60px 100px;
box-shadow:
0 25px 60px rgba(45, 54, 120, 0.75),
inset 0 0 30px #5661f9cc;
transform-style: preserve-3d;
animation: float 7s ease-in-out infinite;
border: 2px solid #5872ffcc;
backdrop-filter: saturate(180%) blur(20px);
}
@keyframes float {
0%, 100% {
transform: translateY(0) rotateX(1deg) rotateY(-3deg);
box-shadow:
0 25px 60px rgba(45, 54, 120, 0.75),
inset 0 0 30px #5661f9cc;
}
50% {
transform: translateY(-20px) rotateX(-1deg) rotateY(3deg);
box-shadow:
0 32px 70px rgba(45, 54, 120, 0.9),
inset 0 0 45px #6a8bffcc;
}
}
/* Title */
#home-page .hero-title {
font-size: 3.8rem;
font-weight: 700;
margin-bottom: 0.75rem;
color: #c3cdfb;
text-shadow:
0 0 18px #4a6bffdd,
0 3px 5px rgba(0,0,0, 0.75);
letter-spacing: 0.08em;
}
/* Subtitle */
#home-page .hero-subtitle {
font-weight: 600;
font-size: 1.25rem;
color: #a0a7d1;
margin-bottom: 50px;
text-shadow: 0 1px 5px rgba(0,0,0,0.35);
}
/* Search bar */
#home-page .search-bar {
display: flex;
justify-content: center;
align-items: center;
max-width: 600px;
margin: auto;
background:
linear-gradient(270deg, #556bff, #00e2d7, #556bff);
background-size: 600% 600%;
animation: gradientShift 14s ease infinite;
border-radius: 50px;
padding: 8px;
box-shadow:
0 0 24px #556bffbb,
0 0 32px #00e2d7bb;
transition: box-shadow 0.35s ease;
perspective: 1200px;
}
@keyframes gradientShift {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
/* Search input */
#home-page .search-bar input[type="search"] {
flex-grow: 1;
border: none;
outline: none;
font-size: 1.4rem;
padding: 20px 38px;
border-radius: 50px;
background: #12142b;
box-shadow:
inset 0 0 15px #2a3b6d,
inset 0 2px 12px #5a7dcedd;
color: #e5e9ff;
font-weight: 600;
letter-spacing: 0.04em;
transition:
all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
transform-style: preserve-3d;
transform-origin: left center;
will-change: transform, box-shadow, color;
}
#home-page .search-bar input[type="search"]::placeholder {
color: #7f8db1dd;
font-weight: 500;
transition: color 0.35s ease;
}
#home-page .search-bar input[type="search"]:focus {
background: #1f2553;
box-shadow:
inset 0 0 25px #557fffcc,
0 0 24px #557fffcc;
color: #e7ebff;
letter-spacing: 0.06em;
transform: scale(1.06) translateZ(30px);
}
#home-page .search-bar input[type="search"]:focus::placeholder {
color: transparent;
}
/* Search button */
#home-page .search-bar button {
margin-left: 14px;
padding: 20px 34px;
border-radius: 50px;
background: linear-gradient(135deg, #3349c9, #1b2f93);
border: none;
outline: none;
cursor: pointer;
font-weight: 700;
font-size: 1.25rem;
color: #f0f4ff;
box-shadow:
0 8px 14px #1c357fdd,
inset 0 -4px 7px #2b3a8fdd;
text-transform: uppercase;
letter-spacing: 0.10em;
transition:
box-shadow 0.3s ease,
transform 0.15s ease;
transform-style: preserve-3d;
position: relative;
will-change: transform, box-shadow;
user-select: none;
display: flex;
align-items: center;
justify-content: center;
}
#home-page .search-bar button:hover {
box-shadow:
0 12px 18px #415ae9cc,
inset 0 -6px 9px #3a44c5cc;
transform: translateZ(8px) scale(1.08);
}
#home-page .search-bar button:active {
box-shadow:
inset 0 4px 9px #2c3aa9cc,
0 0 3px #112244;
transform: translateZ(3px) scale(0.96);
}
/* Search icon */
#home-page .search-bar button svg {
width: 24px;
height: 24px;
fill: #e2e8ff;
filter: drop-shadow(0 0 2px #000a);
transition: transform 0.35s ease;
}
#home-page .search-bar button:hover svg {
transform: scale(1.2);
}
/* Responsive tweaks */
@media (max-width: 720px) {
#home-page .hero-inner {
padding: 50px 30px 70px;
}
#home-page .hero-title {
font-size: 2.8rem;
}
#home-page .hero-subtitle {
font-size: 1rem;
margin-bottom: 30px;
}
#home-page .search-bar input[type="search"] {
font-size: 1.1rem;
padding: 16px 28px;
}
#home-page .search-bar button {
padding: 16px 26px;
font-size: 1rem;
}
}
@media (max-width: 420px) {
#home-page {
padding: 0 12px;
}
#home-page .hero-inner {
padding: 40px 20px 60px;
}
#home-page .hero-title {
font-size: 2.2rem;
}
#home-page .hero-subtitle {
margin-bottom: 20px;
}
}
</style>
<div id="home-page" role="main">
<section class="hero-section" aria-label="Search Journals">
<div class="hero-inner" role="banner">
<h1 class="hero-title">Discover the World of Journals</h1>
<p class="hero-subtitle">Search across thousands of academic and research journals</p>
<form class="search-bar" role="search" aria-label="Journal search form" onsubmit="event.preventDefault(); alert('Search submitted. You entered: ' + this.query.value);">
<input
type="search"
name="query"
placeholder="Search journals, articles, authors..."
aria-label="Journal search input"
autocomplete="off"
required
spellcheck="false"
/>
<button type="submit" aria-label="Submit search">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false" aria-hidden="true" >
<path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z"/>
</svg>
</button>
</form>
</div>
</section>
</div>
Features:
- Full height and width, with content vertically/horizontally centered.
- Smooth dark blue-purple gradient background with subtle vignette shading.
- Hero container has a floating 3D effect with subtle glowing edges and blur.
- Elegant Poppins font with clear hierarchy between title and subtitle.
- Search bar with bright gradient edges animating softly, inset shadows for a glassy futuristic look.
- Smooth scaling & glow animations on input focus and button hover.
- Fully responsive design for tablets and phones.
- Button styled with a pressed 3D effect and a crisp search icon that scales on hover.
To integrate:
Just include home.php where you want the home content rendered inside your main layout. No <!DOCTYPE>, <html> or <body> tags inside home.php — it’s ready to slot into your existing header/footer structure.
If you want me to help adapt this further or help with the backend integration, just say!