/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --black: #000000;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

/* Mobile Container */
.mobile-container {
    max-width: 400px;
    width: 100%;
    background: var(--white);
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Status Bar */
.status-bar {
    background: var(--dark-color);
    color: var(--white);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.status-bar .time {
    font-weight: 600;
}

.status-bar .icons i {
    margin-left: 5px;
}

/* App Header */
.app-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: var(--white);
    padding: 15px;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 700;
}

.logo span {
    font-weight: 300;
    font-size: 14px;
    margin-left: 5px;
}

.back-btn, .menu-toggle {
    color: var(--white);
    font-size: 24px;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-login, .btn-register {
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-login {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-register {
    background: var(--white);
    color: var(--primary-color);
}

.btn-login:hover, .btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: var(--white);
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--white);
}

.user-details h5 {
    margin: 0;
    font-size: 16px;
}

.user-details p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
}

.sidebar-nav ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar-nav li {
    margin: 5px 0;
}

.sidebar-nav li.active {
    background: rgba(0,123,255,0.1);
    border-left: 3px solid var(--primary-color);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover {
    background: rgba(0,123,255,0.1);
}

.sidebar-nav i {
    width: 25px;
    font-size: 18px;
}

.sidebar-nav .logout {
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.sidebar-nav .logout a {
    color: var(--danger-color);
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: -20px -20px 20px -20px;
    padding: 40px 20px;
    color: var(--white);
    text-align: center;
}

.hero-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.search-container {
    max-width: 300px;
    margin: 0 auto;
}

.search-form .input-group {
    background: var(--white);
    border-radius: 30px;
    overflow: hidden;
}

.search-form input {
    border: none;
    padding: 12px 15px;
    font-size: 14px;
}

.search-form input:focus {
    box-shadow: none;
    outline: none;
}

.btn-search {
    background: var(--white);
    border: none;
    padding: 0 20px;
    color: var(--primary-color);
    cursor: pointer;
}

/* Features Section */
.features-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 5px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.feature-card {
    background: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 20px;
}

.feature-card h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.feature-card p {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Apartments Slider */
.featured-section {
    margin-bottom: 30px;
}

.apartments-slider {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 5px 0;
    scroll-snap-type: x mandatory;
}

.apartments-slider::-webkit-scrollbar {
    display: none;
}

.apartment-card {
    min-width: 280px;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    scroll-snap-align: start;
}

.card-image {
    position: relative;
    height: 180px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.card-content {
    padding: 15px;
}

.card-content h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.card-content .location {
    font-size: 12px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-footer .agent {
    font-size: 12px;
    color: var(--secondary-color);
}

.btn-view {
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-view:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* How It Works */
.how-it-works {
    margin-bottom: 30px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.step {
    background: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 700;
}

.step h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.step p {
    font-size: 12px;
    color: var(--secondary-color);
}

/* Bottom Navigation */
.bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--white);
    padding: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 12px;
    transition: all 0.3s;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.nav-item.active {
    color: var(--primary-color);
}

/* Auth Forms */
.auth-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

.auth-header h2 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.auth-header p {
    font-size: 14px;
    color: var(--secondary-color);
}

.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--dark-color);
}

.form-group label i {
    margin-right: 5px;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
}

.remember-me input {
    margin: 0;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
}

.btn-login, .btn-register, .btn-verify {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login {
    background: var(--primary-color);
    color: var(--white);
}

.btn-register {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: var(--white);
}

.btn-verify {
    background: var(--success-color);
    color: var(--white);
}

.btn-login:hover, .btn-register:hover, .btn-verify:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.auth-footer {
    text-align: center;
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #ddd;
}

.auth-divider::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #ddd;
}

.auth-divider span {
    background: var(--white);
    padding: 0 10px;
    color: var(--secondary-color);
    font-size: 12px;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-login button {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.social-login button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-google {
    background: #DB4437;
}

.btn-facebook {
    background: #4267B2;
}

.btn-apple {
    background: #000000;
}

/* OTP Verification */
.verification-icon {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.otp-group {
    text-align: center;
}

.otp-inputs {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 15px 0;
}

.otp-input {
    width: 45px;
    height: 45px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s;
}

.otp-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    outline: none;
}

.timer-section {
    text-align: center;
    margin: 20px 0;
}

#timer {
    font-size: 18px;
    font-weight: 700;
    color: var(--danger-color);
}

.btn-resend {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-resend:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert i {
    font-size: 18px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}