/* Root Variables */
:root {
    --primary-color: #ff4458;
    --primary-dark: #e6293d;
    --secondary-color: #00d4ff;
    --success-color: #00c853;
    --danger-color: #ff1744;
    --warning-color: #ffc107;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --background: #f5f5f5;
    --card-background: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.admin-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Admin-only wide blocks should be wrapped in .admin-container to allow sliding. */

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-bottom: 80px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 88, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
    box-shadow: var(--shadow);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 68, 88, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition);
    border-radius: 34px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + .slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(22px);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 70px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--text-lighter);
    transition: var(--transition);
    position: relative;
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.75rem;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item .badge {
    position: absolute;
    top: 10px;
    right: calc(50% - 20px);
    background: var(--danger-color);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: transparent;
}

.animated-bg { position: fixed; inset:0; z-index: 0; overflow:hidden; }
.animated-bg .bg-strip { position:absolute; left:-30%; right:-30%; height:40%; opacity:0.25; filter: blur(6px); background-size:cover; background-position:center; animation: slideX 24s linear infinite; }
.animated-bg .bg-strip.strip-1 { top:0; animation-duration: 28s; }
.animated-bg .bg-strip.strip-2 { top:30%; animation-duration: 22s; animation-direction: reverse; }
.animated-bg .bg-strip.strip-3 { top:60%; animation-duration: 26s; }
@keyframes slideX { 0% { transform: translateX(-10%); } 50% { transform: translateX(10%); } 100% { transform: translateX(-10%); } }
.animated-bg .floater { position:absolute; width:220px; height:320px; border-radius:16px; background-size:cover; background-position:center; box-shadow: var(--shadow-lg); opacity:0.28; filter: saturate(1.1) contrast(1.05); pointer-events:none; }
.animated-bg .floater.floater-1 { top:8%; left:6%; animation: drift1 26s ease-in-out infinite; }
.animated-bg .floater.floater-2 { top:18%; right:8%; animation: drift2 30s ease-in-out infinite; }
.animated-bg .floater.floater-3 { bottom:12%; left:10%; animation: drift3 24s ease-in-out infinite; }
.animated-bg .floater.floater-4 { bottom:8%; right:12%; animation: drift4 28s ease-in-out infinite; }
.animated-bg .floater.floater-5 { top:38%; left:40%; animation: drift5 32s ease-in-out infinite; }
@keyframes drift1 { 0%{ transform: translate(0,0) rotate(-2deg);} 50%{ transform: translate(30px,-20px) rotate(2deg);} 100%{ transform: translate(0,0) rotate(-2deg);} }
@keyframes drift2 { 0%{ transform: translate(0,0) rotate(3deg);} 50%{ transform: translate(-25px,15px) rotate(-1deg);} 100%{ transform: translate(0,0) rotate(3deg);} }
@keyframes drift3 { 0%{ transform: translate(0,0) rotate(0deg);} 50%{ transform: translate(20px,-10px) rotate(3deg);} 100%{ transform: translate(0,0) rotate(0deg);} }
@keyframes drift4 { 0%{ transform: translate(0,0) rotate(-3deg);} 50%{ transform: translate(-20px,10px) rotate(1deg);} 100%{ transform: translate(0,0) rotate(-3deg);} }
@keyframes drift5 { 0%{ transform: translate(0,0) rotate(1deg);} 50%{ transform: translate(15px,20px) rotate(-2deg);} 100%{ transform: translate(0,0) rotate(1deg);} }
.auth-container, .auth-card, .subscription-container, .settings-container, .discover-container { position: relative; z-index: 1; }

/* Site Header & Menu */
.site-header { display:grid; grid-template-columns: 44px 1fr 44px; align-items:center; padding:12px 16px; background:#fff; box-shadow: var(--shadow); position: sticky; top:0; z-index: 10; }
.site-logo { display:flex; align-items:center; gap:8px; font-weight:600; color: var(--text-color); justify-self:center; }
.menu-sidebar { position:fixed; top:0; bottom:0; left:-280px; width:280px; background:#fff; box-shadow: var(--shadow-lg); transition:left .2s ease; z-index: 100; display:flex; flex-direction:column; }
.menu-sidebar.open { left:0; }
.menu-header { display:flex; align-items:center; justify-content:space-between; padding:12px; border-bottom:2px solid var(--border-color); }
.menu-content { padding:12px; overflow-y:auto; flex:1; }
.menu-item { display:block; padding:10px 12px; border-radius:8px; color: var(--text-color); }
.menu-item:hover { background: var(--background); }
.menu-footer { padding:12px; border-top:2px solid var(--border-color); }
.menu-backdrop { position:fixed; inset:0; background: rgba(0,0,0,0.25); display:none; z-index: 90; }
.menu-backdrop.show { display:block; }
.has-dropdown .dropdown { margin-top:8px; border-left: 3px solid var(--border-color); padding-left:8px; }
.dropdown-item { display:block; padding:6px 8px; color: var(--text-color); }
.modal { display:none; position:fixed; inset:0; z-index:200; background: rgba(0,0,0,0.35); padding: 20px; }
.modal .modal-content { margin: 60px auto; max-width: 520px; background:#fff; border-radius: 12px; box-shadow: var(--shadow-lg); }
.modal .modal-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:2px solid var(--border-color); }
.modal .modal-body { padding: 16px; }

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-card h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.auth-card h2 {
    text-align: center;
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
}

.auth-footer p {
    margin: 0.5rem 0;
    color: var(--text-light);
}

/* Discover Feed */
.discover-container {
    min-height: 100vh;
    background: var(--background);
}

.discover-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    padding: 20px;
    background: white;
    box-shadow: var(--shadow);
}
.discover-header .logo { justify-self: center; }

.phone-showcase { display:flex; justify-content:center; padding: 12px 0; }
.phone-frame { width: 280px; height: 560px; border-radius: 36px; box-shadow: var(--shadow-lg); background:#111; position: relative; overflow: hidden; }
.phone-screen { position:absolute; inset:12px; border-radius: 24px; background:#000; overflow:hidden; }
.phone-cards { position:absolute; inset:0; }
.phone-cards img { position:absolute; width: 70%; border-radius: 16px; box-shadow: var(--shadow); opacity: 0.8; }
.phone-cards img.card-a { top:10%; left:15%; animation: floatCardA 8s ease-in-out infinite; }
.phone-cards img.card-b { top:40%; left:10%; animation: floatCardB 9s ease-in-out infinite; }
.phone-cards img.card-c { top:20%; left:35%; animation: floatCardC 7s ease-in-out infinite; }
@keyframes floatCardA { 0%{ transform: translate(0,0) rotate(-3deg);} 50%{ transform: translate(6px,-6px) rotate(2deg);} 100%{ transform: translate(0,0) rotate(-3deg);} }
@keyframes floatCardB { 0%{ transform: translate(0,0) rotate(3deg);} 50%{ transform: translate(-8px,4px) rotate(-2deg);} 100%{ transform: translate(0,0) rotate(3deg);} }
@keyframes floatCardC { 0%{ transform: translate(0,0) rotate(0deg);} 50%{ transform: translate(10px,6px) rotate(4deg);} 100%{ transform: translate(0,0) rotate(0deg);} }

.discover-header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.cards-container {
    position: relative;
    height: calc(100vh - 220px);
    padding: 20px;
}

.card {
    position: absolute;
    width: calc(100% - 40px);
    height: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    cursor: grab;
    transition: transform 0.3s ease;
}

.card:active {
    cursor: grabbing;
}

.card-image {
    position: relative;
    width: 100%;
    height: 70%;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
}

.card-info h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.card-info .bio {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.btn-info {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.btn-info:hover {
    background: white;
    transform: scale(1.1);
}

.like-indicator,
.nope-indicator {
    position: absolute;
    top: 50px;
    font-size: 5rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.like-indicator {
    right: 30px;
    color: var(--success-color);
    transform: rotate(20deg);
}

.nope-indicator {
    left: 30px;
    color: var(--danger-color);
    transform: rotate(-20deg);
}

.card.like .like-indicator,
.card.nope .nope-indicator {
    opacity: 1;
}

.no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    color: var(--text-lighter);
    font-size: 5rem;
}

.no-users {
    text-align: center;
    padding: 60px 20px;
}

.no-users i {
    font-size: 5rem;
    color: var(--text-lighter);
    margin-bottom: 1rem;
}

.no-users h2 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.no-users p {
    color: var(--text-light);
}

/* Action Buttons */
.action-buttons {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 100;
}

.btn-action {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.5rem;
}

.btn-pass {
    color: var(--danger-color);
}

.btn-like {
    color: var(--success-color);
}

.btn-super {
    color: var(--secondary-color);
}

.btn-action:hover {
    transform: scale(1.1);
}

.btn-action:active {
    transform: scale(0.95);
}

/* Profile Page */
.profile-container {
    background: white;
    min-height: 100vh;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.profile-photos {
    position: relative;
    width: 100%;
    height: 500px;
    background: var(--background);
}

.photo-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.photo-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.photo-slide.active {
    opacity: 1;
}

.photo-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.slider-btn:hover {
    background: white;
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.no-photos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.no-photos i {
    font-size: 5rem;
    color: var(--text-lighter);
    margin-bottom: 1rem;
}

.profile-info {
    padding: 20px;
}

.info-section {
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.info-item i {
    color: var(--primary-color);
    width: 20px;
}

.bio-section {
    margin-bottom: 2rem;
}

.bio-section h3 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.bio-section p {
    color: var(--text-light);
    line-height: 1.6;
}

.interests-section {
    margin-bottom: 2rem;
}

.interests-section h3 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--background);
    border-radius: 20px;
    color: var(--text-color);
    font-size: 0.9rem;
}

.profile-actions {
    position: fixed;
    bottom: 90px;
    left: 0;
    right: 0;
    padding: 0 20px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Edit Profile */
.edit-profile-container {
    background: var(--background);
    min-height: 100vh;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.edit-form {
    padding: 20px;
}

.form-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.form-section h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.interests-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.interest-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
}

.interest-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-interest {
    display: flex;
    gap: 10px;
}

.add-interest input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

/* Upload Photos */
.upload-container {
    background: var(--background);
    min-height: 100vh;
}

.upload-section {
    padding: 20px;
}

.upload-area {
    background: white;
    border: 3px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(255, 68, 88, 0.05);
}

.upload-area i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.photos-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.photo-card {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.primary-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.btn-set-primary {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-set-primary:hover {
    background: white;
}

.btn-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--danger-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-delete:hover {
    transform: scale(1.1);
}

/* Messages */
.inbox-container {
    background: var(--background);
    min-height: 100vh;
}

.no-messages {
    text-align: center;
    padding: 60px 20px;
}

.no-messages i {
    font-size: 5rem;
    color: var(--text-lighter);
    margin-bottom: 1rem;
}

.matches-list {
    padding: 10px 0;
}

.match-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.match-item:hover {
    background: var(--background);
}

.match-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.match-avatar img,
.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    color: var(--text-lighter);
    font-size: 1.5rem;
}

.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.match-info {
    flex: 1;
    min-width: 0;
}

.match-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.last-message {
    color: var(--text-light);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-message.unread {
    color: var(--text-color);
    font-weight: 600;
}

.match-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.match-meta .time {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--background);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: white;
    box-shadow: var(--shadow);
    z-index: 100;
}

.chat-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    cursor: pointer;
}

.user-avatar {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

.user-info h2 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.online-status {
    font-size: 0.85rem;
    color: var(--text-light);
}

.online-status.online {
    color: var(--success-color);
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 100px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message.sent {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background: white;
    color: var(--text-color);
    border-bottom-left-radius: 4px;
}

.message img {
    max-width: 200px;
    border-radius: 12px;
    cursor: pointer;
}

.message-time {
    display: block;
    font-size: 0.75rem;
    margin-top: 5px;
    opacity: 0.7;
}

.voice-message {
    display: flex;
    align-items: center;
    gap: 10px;
}

.voice-message button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    cursor: pointer;
}

.voice-wave {
    width: 100px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    align-self: flex-start;
    max-width: 70px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-lighter);
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.message-input-container {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 10px 15px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    z-index: 100;
}

.message-input {
    flex: 1;
}

.message-input textarea {
    width: 100%;
    border: none;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    max-height: 100px;
    padding: 10px;
}

.message-input textarea:focus {
    outline: none;
}

.btn-send {
    background: var(--primary-color);
    color: white;
}

#voiceBtn.recording {
    background: var(--danger-color);
    color: white;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Video Call */
.video-call-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

#remoteVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#localVideo {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 160px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.call-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.calling-info {
    text-align: center;
    color: white;
}

.calling-info .avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.calling-info .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.calling-info h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.call-controls {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 20;
}

.control-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.control-btn.end-call {
    background: var(--danger-color);
}

.control-btn.end-call:hover {
    background: #d50000;
}

.call-timer {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 20;
}

/* Settings */
.settings-container {
    background: var(--background);
    min-height: 100vh;
}

.settings-form {
    padding: 20px;
}

.settings-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.settings-section h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
}

.setting-info label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.setting-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.setting-item select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

.blocked-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-blocked {
    text-align: center;
    color: var(--text-light);
    padding: 20px;
}

.blocked-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: var(--background);
    border-radius: 8px;
}

.blocked-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blocked-user img,
.blocked-user .avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Subscription */
.subscription-container {
    background: var(--background);
    min-height: 100vh;
}

.current-plan {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.plan-badge {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.current-plan h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upgrade-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.upgrade-banner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.plans-grid {
    padding: 20px;
    display: grid;
    gap: 20px;
}

.plan-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.plan-card.active {
    border: 3px solid var(--primary-color);
}

.plan-header {
    text-align: center;
    margin-bottom: 2rem;
}

.plan-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.plan-price .currency {
    font-size: 1.25rem;
    color: var(--text-light);
}

.plan-price .amount {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

.plan-price .period {
    font-size: 1rem;
    color: var(--text-light);
}

.plan-features {
    margin-bottom: 2rem;
}

.plan-features h4 {
    margin-bottom: 1rem;
}

.plan-features ul {
    list-style: none;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.plan-features li i {
    color: var(--success-color);
}

.payment-methods {
    padding: 20px;
    text-align: center;
}

.payment-logos {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 2rem;
    color: var(--text-lighter);
    margin-top: 1rem;
}

/* Success Page */
.success-container {
    min-height:100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--background);
}

.success-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-card h1 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.success-card p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    margin: 0;
}

.btn-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--background);
    cursor: pointer;
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--border-color);
}

/* Match Modal */
.match-modal {
    text-align: center;
}

.match-animation {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: heartbeat 1s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
}

.match-modal h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.match-modal p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.match-users {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.match-users img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    object-fit: cover;
}

/* Filters Modal */
.filters-modal {
    max-width: 400px;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-inputs input[type="number"] {
    width: 70px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.info {
    border-left: 4px solid var(--secondary-color);
}

.notification i {
    font-size: 1.5rem;
}

.notification.success i {
    color: var(--success-color);
}

.notification.error i {
    color: var(--danger-color);
}

.notification.warning i {
    color: var(--warning-color);
}

.notification.info i {
    color: var(--secondary-color);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        width: calc(100% - 40px);
    }
    
    .photo-slider {
        height: 400px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
    
    .main-content {
        padding-bottom: 20px;
    }
    
    .message-input-container {
        bottom: 0;
    }
    
    .profile-actions,
    .action-buttons {
        bottom: 20px;
    }
    
    #app {
        max-width: 500px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --text-color: #ffffff;
        --text-light: #b0b0b0;
        --text-lighter: #808080;
        --background: #121212;
        --card-background: #1e1e1e;
        --border-color: #333333;
    }
    
    body {
        background: var(--background);
        color: var(--text-color);
    }
    
    .auth-card,
    .card,
    .modal-content,
    .form-section,
    .settings-section {
        background: var(--card-background);
    }
    */
}

/* Print Styles */
@media print {
    .bottom-nav,
    .action-buttons,
    .btn-icon,
    .chat-header,
    .message-input-container {
        display: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-lighter);
}
/* Loader overlay */
.global-loader {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.global-loader .spinner {
  background: #fff;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  font-size: 24px;
  color: #ff4458;
}

.logo-wordmark {
  height: 28px;
  object-fit: contain;
}
.discover-header .logo img {
  height: 32px;
}

/* Settings Pages */
.settings-container {
  min-height: 100vh;
  background: var(--background);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px;
}

.settings-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px 16px;
  text-align: center;
  color: var(--text-color);
  box-shadow: var(--shadow);
}

.settings-card i {
  font-size: 1.6rem;
  color: var(--primary-color);
}

.settings-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.settings-card.danger i {
  color: var(--danger-color);
}

/* Logo sizing */
.logo-wordmark {
  height: 44px;
  object-fit: contain;
  display: inline-block;
}

/* Admin Pages */
.admin-container {
  padding: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.admin-container .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.admin-container .stat {
  background: #fff;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.admin-container .links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.settings-form .form-group { margin-bottom: 12px; }
.settings-form input[type=text], .settings-form textarea, .settings-form select {
  width: 100%; padding: 10px 12px; border: 2px solid var(--border-color); border-radius: var(--border-radius);
}
.admin-container .btn,
.admin-list .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: #fff;
  color: var(--text-color);
}
.admin-list {
  padding: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.admin-list h1 {
  margin-bottom: 8px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-width: 800px;
}
.table thead th {
  background: var(--background);
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1;
}
.table tbody td {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  word-break: break-word;
}
.table .actions {
  display: inline-flex;
  gap: 8px;
}
.btn-danger {
  border-color: var(--danger-color);
  color: var(--danger-color);
}
.btn-success {
  border-color: var(--success-color);
  color: var(--success-color);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

@media (max-width: 768px) {
  .admin-container .stats { grid-template-columns: 1fr; }
  .admin-container .links { grid-template-columns: 1fr; }
  .table { min-width: 600px; }
}

@media (max-width: 480px) {
  .table { min-width: 520px; }
}

.logo-wordmark { max-width: 240px; width: 100%; }
