video-charm / static /css /styles.css
perryrperry's picture
Upload 10 files
71f9056 verified
:root {
--primary-color: #FF2C55;
--secondary-color: #00F2EA;
--dark-color: #121212;
--darker-color: #0A0A0A;
--light-color: #ffffff;
--gray-color: #888888;
--light-gray-color: #CCCCCC;
--overlay-color: rgba(0, 0, 0, 0.4);
--gradient-overlay: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 40%);
--card-background: rgba(255, 255, 255, 0.08);
--blur-effect: blur(10px);
--transition-normal: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
--transition-slow: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
--shadow-normal: 0 4px 12px rgba(0, 0, 0, 0.15);
--shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.2);
--border-radius: 12px;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Nunito', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
background-color: var(--dark-color);
color: var(--light-color);
overflow: hidden;
touch-action: pan-y;
position: fixed;
width: 100%;
height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.app-container {
width: 100%;
height: 100vh;
overflow: hidden;
position: relative;
}
/* Main screens */
.screen {
width: 100%;
height: calc(100vh - 60px);
position: absolute;
left: 0;
top: 0;
transition: var(--transition-normal);
opacity: 0;
visibility: hidden;
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
background-color: var(--darker-color);
}
.screen.active {
opacity: 1;
visibility: visible;
}
/* Video Feed Screen */
.video-feed {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
background-color: black;
}
.video-card {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
transition: var(--transition-slow);
}
video {
width: 100%;
height: 100%;
object-fit: cover;
}
.video-overlay {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 40%;
background: var(--gradient-overlay);
z-index: 5;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 20px;
}
.action-buttons {
position: absolute;
right: 16px;
bottom: 120px;
display: flex;
flex-direction: column;
align-items: center;
z-index: 10;
}
.action-button {
width: 48px;
height: 48px;
background-color: rgba(255, 255, 255, 0.15);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
cursor: pointer;
backdrop-filter: var(--blur-effect);
-webkit-backdrop-filter: var(--blur-effect);
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: var(--shadow-normal);
transition: var(--transition-normal);
position: relative;
}
.action-button:hover, .action-button:active {
transform: scale(1.1);
background-color: rgba(255, 255, 255, 0.25);
}
.action-button.like {
background-color: rgba(255, 44, 85, 0.2);
}
.action-button.like.active {
background-color: rgba(255, 44, 85, 0.6);
}
.action-button.favorite {
background-color: rgba(255, 215, 0, 0.2);
}
.action-button.favorite.active {
background-color: rgba(255, 215, 0, 0.6);
}
.action-count {
position: absolute;
bottom: -6px;
font-size: 12px;
font-weight: 600;
}
.action-label {
font-size: 12px;
margin-top: 5px;
color: var(--light-color);
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.loading-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--dark-color);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1000;
}
.loading-spinner {
width: 50px;
height: 50px;
border: 3px solid transparent;
border-top: 3px solid var(--primary-color);
border-right: 3px solid var(--secondary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading-text {
font-size: 16px;
font-weight: 600;
color: var(--light-color);
text-align: center;
}
.swipe-indicator {
position: absolute;
bottom: 80px;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
opacity: 0.8;
z-index: 10;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 0.4; transform: translateX(-50%) scale(0.95); }
50% { opacity: 0.8; transform: translateX(-50%) scale(1); }
100% { opacity: 0.4; transform: translateX(-50%) scale(0.95); }
}
.swipe-icon {
width: 36px;
height: 36px;
margin-bottom: 8px;
}
.swipe-text {
font-size: 14px;
color: var(--light-color);
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
font-weight: 600;
}
.header {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 60px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 16px;
z-index: 100;
background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 100%);
}
.app-title {
display: flex;
align-items: center;
font-size: 22px;
font-weight: 700;
color: var(--light-color);
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.app-title .accent {
color: var(--primary-color);
}
.logo-small {
width: 28px;
height: 28px;
margin-right: 8px;
}
.progress-bar {
position: absolute;
top: 60px;
left: 0;
width: 100%;
height: 3px;
background-color: rgba(255, 255, 255, 0.2);
z-index: 100;
}
.progress-fill {
height: 100%;
width: 0;
background-color: var(--primary-color);
transition: width 0.1s linear;
}
.video-info {
padding: 12px 16px;
position: relative;
z-index: 10;
}
.video-title {
font-size: 18px;
font-weight: 700;
margin-bottom: 8px;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.video-desc {
font-size: 14px;
opacity: 0.9;
margin-bottom: 12px;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.video-meta {
display: flex;
align-items: center;
font-size: 12px;
opacity: 0.7;
}
.video-meta-item {
margin-right: 16px;
display: flex;
align-items: center;
}
.video-meta-item svg {
margin-right: 4px;
width: 14px;
height: 14px;
}
.play-pause-overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0);
width: 80px;
height: 80px;
background-color: rgba(0, 0, 0, 0.5);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
z-index: 15;
opacity: 0;
transition: var(--transition-normal);
backdrop-filter: var(--blur-effect);
-webkit-backdrop-filter: var(--blur-effect);
}
.play-pause-overlay.visible {
transform: translate(-50%, -50%) scale(1);
opacity: 1;
}
.volume-control {
position: absolute;
right: 16px;
top: 80px;
width: 40px;
height: 40px;
background-color: rgba(255, 255, 255, 0.15);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
z-index: 10;
cursor: pointer;
backdrop-filter: var(--blur-effect);
-webkit-backdrop-filter: var(--blur-effect);
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: var(--shadow-normal);
}
/* Navigation Bar */
.nav-bar {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 60px;
background-color: rgba(18, 18, 18, 0.95);
backdrop-filter: var(--blur-effect);
-webkit-backdrop-filter: var(--blur-effect);
display: flex;
justify-content: space-around;
align-items: center;
z-index: 1000;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 8px 0;
width: 25%;
cursor: pointer;
}
.nav-icon {
width: 24px;
height: 24px;
margin-bottom: 4px;
transition: var(--transition-normal);
color: var(--gray-color);
}
.nav-label {
font-size: 12px;
transition: var(--transition-normal);
color: var(--gray-color);
}
.nav-item.active .nav-label {
color: var(--primary-color);
}
.nav-item.active .nav-icon {
color: var(--primary-color);
}
/* History Screen */
.history-screen, .favorites-screen {
background-color: var(--darker-color);
padding: 70px 0 20px 0;
}
.screen-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 16px;
margin-bottom: 20px;
}
.section-title {
font-size: 24px;
font-weight: 700;
}
.clear-btn {
background-color: rgba(255, 255, 255, 0.1);
border: none;
padding: 8px 16px;
border-radius: 20px;
color: var(--light-gray-color);
font-size: 14px;
cursor: pointer;
transition: var(--transition-normal);
}
.clear-btn:hover {
background-color: rgba(255, 255, 255, 0.2);
}
.video-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
padding: 0 16px 80px 16px;
}
.video-item {
background-color: var(--card-background);
border-radius: var(--border-radius);
overflow: hidden;
box-shadow: var(--shadow-normal);
transition: var(--transition-normal);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.video-item:hover, .video-item:active {
transform: translateY(-5px);
box-shadow: var(--shadow-elevated);
}
.video-thumbnail {
position: relative;
width: 100%;
padding-top: 177.77%; /* 16:9 aspect ratio */
overflow: hidden;
background-color: #333;
}
.video-thumbnail img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.video-duration {
position: absolute;
bottom: 8px;
right: 8px;
background-color: rgba(0, 0, 0, 0.7);
color: white;
padding: 2px 6px;
border-radius: 4px;
font-size: 12px;
}
.video-item-info {
padding: 10px;
}
.video-item-title {
font-size: 14px;
font-weight: 600;
margin-bottom: 6px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.video-item-meta {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
color: var(--gray-color);
}
.time-ago {
display: flex;
align-items: center;
}
.time-ago svg {
width: 12px;
height: 12px;
margin-right: 4px;
}
/* Empty state */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 50vh;
text-align: center;
padding: 20px;
color: var(--gray-color);
}
.empty-icon {
width: 80px;
height: 80px;
margin-bottom: 20px;
opacity: 0.5;
}
.empty-title {
font-size: 20px;
font-weight: 600;
margin-bottom: 10px;
}
.empty-desc {
font-size: 14px;
max-width: 280px;
}
/* Profile Screen */
.profile-screen {
background-color: var(--darker-color);
padding-top: 0;
}
.profile-header {
height: 200px;
background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
position: relative;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
padding-bottom: 24px;
}
.profile-avatar {
width: 100px;
height: 100px;
border-radius: 50%;
border: 4px solid white;
overflow: hidden;
margin-bottom: 12px;
box-shadow: var(--shadow-elevated);
}
.profile-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.profile-name {
font-size: 22px;
font-weight: 700;
margin-bottom: 4px;
}
.profile-stats {
display: flex;
justify-content: space-around;
align-items: center;
width: 100%;
padding: 20px 16px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-item {
display: flex;
flex-direction: column;
align-items: center;
}
.stat-value {
font-size: 18px;
font-weight: 700;
margin-bottom: 4px;
}
.stat-label {
font-size: 12px;
color: var(--gray-color);
}
.profile-actions {
display: flex;
flex-direction: column;
padding: 20px 16px 80px 16px;
}
.action-row {
display: flex;
align-items: center;
padding: 16px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
cursor: pointer;
}
.action-icon {
width: 24px;
height: 24px;
margin-right: 16px;
opacity: 0.8;
}
.action-text {
flex: 1;
font-size: 16px;
}
.action-arrow {
width: 20px;
height: 20px;
opacity: 0.5;
}
/* Toast notification */
.toast {
position: fixed;
top: 80px;
left: 50%;
transform: translateX(-50%);
background-color: rgba(0, 0, 0, 0.8);
color: white;
padding: 10px 20px;
border-radius: 30px;
font-size: 14px;
z-index: 2000;
backdrop-filter: var(--blur-effect);
-webkit-backdrop-filter: var(--blur-effect);
opacity: 0;
transition: var(--transition-normal);
pointer-events: none;
}
.toast.show {
opacity: 1;
}
/* Error page */
.error-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: var(--darker-color);
}
.error-card {
background-color: var(--dark-color);
border-radius: var(--border-radius);
padding: 40px;
max-width: 90%;
width: 400px;
text-align: center;
box-shadow: var(--shadow-elevated);
}
.logo {
width: 80px;
height: 80px;
margin-bottom: 20px;
}
.button {
display: inline-block;
margin-top: 20px;
padding: 10px 20px;
background-color: var(--primary-color);
color: white;
text-decoration: none;
border-radius: 30px;
font-weight: 600;
transition: var(--transition-normal);
}
.button:hover {
background-color: #ff4d6e;
transform: translateY(-2px);
}
/* Animation for card transition */
@keyframes slideInUp {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
.slide-in {
animation: slideInUp 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
/* Responsive adjustments */
@media (min-width: 768px) {
.video-grid {
grid-template-columns: repeat(3, 1fr);
}
}
@media (min-width: 1024px) {
.video-grid {
grid-template-columns: repeat(4, 1fr);
}
}