Files
challenge-11/css/styles.css

529 lines
9.5 KiB
CSS

/* Fallback styles in case CDN links fail */
:root {
--primary-color: #8b5cf6;
--secondary-color: #ec4899;
--dark-bg: #4c1d95;
--light-bg: #f8f9fa;
--text-dark: #1f2937;
--text-light: #6b7280;
--white: #ffffff;
--shadow: 0 2px 4px rgba(0,0,0,0.1);
--shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
--gradient-primary: linear-gradient(135deg, #8b5cf6, #ec4899);
--gradient-secondary: linear-gradient(135deg, #6366f1, #8b5cf6);
}
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
line-height: 1.5;
background: linear-gradient(135deg, var(--light-bg), #e0e7ff);
color: var(--text-dark);
scroll-behavior: smooth;
}
/* Container fallback */
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
}
/* Navbar fallback */
.navbar {
background: var(--gradient-primary);
padding: 1rem 0;
box-shadow: var(--shadow);
transition: all 0.3s ease;
}
.navbar:hover {
box-shadow: var(--shadow-lg);
}
.navbar-brand {
color: var(--white);
text-decoration: none;
font-size: 1.25rem;
font-weight: bold;
transition: transform 0.3s ease;
}
.navbar-brand:hover {
transform: scale(1.1);
}
.navbar-nav {
list-style: none;
display: flex;
gap: 1rem;
}
.nav-link {
color: var(--white);
text-decoration: none;
opacity: 0.8;
transition: all 0.3s ease;
position: relative;
}
.nav-link::after {
content: '';
position: absolute;
width: 0;
height: 2px;
bottom: -2px;
left: 0;
background: var(--gradient-primary);
transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
width: 100%;
}
.nav-link:hover,
.nav-link.active {
opacity: 1;
color: #f472b6;
}
/* Button fallback */
.btn {
display: inline-block;
padding: 0.5rem 1rem;
border: none;
border-radius: 0.25rem;
cursor: pointer;
text-decoration: none;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.btn::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 0.6s ease, height 0.6s ease;
}
.btn:hover::before {
width: 300px;
height: 300px;
}
.btn-primary {
background: var(--gradient-primary);
color: var(--white);
box-shadow: var(--shadow);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
background: linear-gradient(135deg, #7c3aed, #db2777);
}
/* Grid fallback */
.row {
display: flex;
flex-wrap: wrap;
margin: -15px;
}
.col-md-8 {
flex: 0 0 66.666667%;
max-width: 66.666667%;
padding: 15px;
}
.mx-auto {
margin-left: auto;
margin-right: auto;
}
/* Utility classes fallback */
.py-8 {
padding-top: 2rem;
padding-bottom: 2rem;
}
.mt-4 {
margin-top: 1rem;
}
.mb-4 {
margin-bottom: 1rem;
}
.text-3xl {
font-size: 1.875rem;
}
.font-bold {
font-weight: 700;
}
.text-gray-600 {
color: var(--text-light);
}
.bg-white {
background-color: var(--white);
}
.rounded-lg {
border-radius: 0.5rem;
}
.shadow-md {
box-shadow: var(--shadow);
}
.p-6 {
padding: 1.5rem;
}
/* Custom styles */
.navbar {
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-primary {
transition: all 0.3s ease;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
/* Form styles */
.form-control {
transition: all 0.3s ease;
border: 2px solid transparent;
}
.form-control:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
transform: translateY(-1px);
}
/* Card hover effects */
.card {
transition: all 0.3s ease;
background: linear-gradient(135deg, #ffffff, #f9fafb);
}
.card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
background: linear-gradient(135deg, #ffffff, #f3f4f6);
}
/* Custom animations */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.fade-in {
animation: fadeIn 0.5s ease-in;
}
/* Gradient backgrounds */
.gradient-bg {
background: var(--gradient-primary);
background-size: 200% 200%;
animation: gradient 15s ease infinite;
}
@keyframes gradient {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
/* Section backgrounds */
.section-gradient-1 {
background: linear-gradient(135deg, #ffffff, #e0e7ff);
}
.section-gradient-2 {
background: linear-gradient(135deg, #f3e8ff, #fdf2f8);
}
.section-gradient-3 {
background: linear-gradient(135deg, #e0e7ff, #ede9fe);
}
/* Text gradients */
.text-gradient {
background: var(--gradient-primary);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
/* Border gradients */
.border-gradient {
border: 2px solid transparent;
background: linear-gradient(white, white) padding-box,
var(--gradient-primary) border-box;
}
/* Responsive fallback */
@media (max-width: 768px) {
.navbar-nav {
flex-direction: column;
display: none;
}
.navbar-nav.show {
display: flex;
}
.col-md-8 {
flex: 0 0 100%;
max-width: 100%;
}
}
/* Navbar Styles */
.glass-nav {
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.glass-nav:hover {
background: rgba(17, 24, 39, 0.9);
}
.navbar-brand img {
filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.5));
}
.nav-link {
position: relative;
padding: 0.5rem 1rem;
margin: 0 0.25rem;
}
.nav-link.active {
color: #fff !important;
}
.nav-link.active::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(to right, #ef4444, #f97316);
transform: scaleX(1);
transition: transform 0.3s ease;
}
.nav-link:not(.active)::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(to right, #ef4444, #f97316);
transform: scaleX(0);
transition: transform 0.3s ease;
transform-origin: right;
}
.nav-link:hover::after {
transform: scaleX(1);
transform-origin: left;
}
/* Slow spin animation for logo */
@keyframes spin-slow {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.animate-spin-slow {
animation: spin-slow 20s linear infinite;
}
/* Navbar scroll effect */
.navbar {
transition: all 0.3s ease;
}
.navbar.scrolled {
background: rgba(17, 24, 39, 0.95);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
/* Modal Styles */
.modal-content {
background: #1f2937;
border: 1px solid #ef4444;
}
.modal-header {
border-bottom: 1px solid #374151;
}
.modal-footer {
border-top: 1px solid #374151;
}
/* Form Styles */
.form-control {
background-color: #374151;
border-color: #4b5563;
color: #fff;
}
.form-control:focus {
background-color: #374151;
border-color: #ef4444;
color: #fff;
box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25);
}
/* Button Styles */
.btn-primary {
background: linear-gradient(to right, #ef4444, #f97316);
border: none;
}
.btn-primary:hover {
background: linear-gradient(to right, #dc2626, #ea580c);
}
.btn-outline-secondary {
border-color: #ef4444;
color: #ef4444;
}
.btn-outline-secondary:hover {
background: linear-gradient(to right, #ef4444, #f97316);
border-color: transparent;
color: #fff;
}
/* Search Results */
.search-result-item {
transition: all 0.3s ease;
}
.search-result-item:hover {
transform: translateX(5px);
}
/* Customer Details */
.interaction-item {
transition: all 0.3s ease;
}
.interaction-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
/* Mobile menu styles */
@media (max-width: 991.98px) {
.navbar-collapse {
background: rgba(17, 24, 39, 0.95);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-radius: 0.5rem;
padding: 1rem;
margin-top: 0.5rem;
}
.nav-link {
padding: 0.75rem 1rem;
border-radius: 0.375rem;
}
.nav-link:hover {
background: rgba(255, 255, 255, 0.1);
}
.nav-link::after {
display: none;
}
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-in {
animation: fadeIn 0.3s ease-out;
}
/* Scrollbar Styles */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #1f2937;
}
::-webkit-scrollbar-thumb {
background: #ef4444;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #dc2626;
}