/* ConnectNear - Estilos para PHP/MySQL */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: white;
    text-align: center;
}

.loading-content h2 {
    margin: 20px 0 10px;
    font-size: 28px;
}

.loading-content p {
    font-size: 16px;
    opacity: 0.8;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 24px;
    margin: 0;
    flex: 1;
    text-align: center;
}

.header-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.header-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Navigation Tabs */
.nav-tabs {
    display: none;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0;
}

.nav-tabs.show {
    display: flex;
}

.nav-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 15px 5px;
    cursor: pointer;
    font-size: 11px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.nav-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.05);
}

.nav-tab:hover {
    background: #e9ecef;
}

/* Welcome Screen */
.welcome-screen {
    padding: 20px;
    text-align: center;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-section {
    margin-bottom: 40px;
}

.logo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.logo h1 {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.tagline {
    font-size: 18px;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.4;
}

.hero-section {
    margin-bottom: 40px;
}

.feature-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.feature-icon {
    font-size: 40px;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.main-buttons {
    margin-bottom: 30px;
}

.btn {
    width: 100%;
    height: 50px;
    border-radius: 25px;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 15px;
    border: 1px solid #667eea;
    background: white;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: #667eea;
    color: white;
}

/* Demo Banner */
.demo-banner {
    margin: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid #667eea;
    border-radius: 10px;
    text-align: center;
}

.demo-banner p {
    color: #667eea;
    font-size: 14px;
    margin: 0;
}

/* User Dashboard */
.user-dashboard {
    padding: 20px;
}

/* Location Status */
.location-status {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.location-status.clickable {
    border-color: #667eea;
    cursor: pointer;
}

.location-status.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.location-indicator {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #28a745;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.location-text {
    font-size: 14px;
    color: #555;
    font-weight: 600;
}

/* Main Actions Grid */
.main-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.action-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.action-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.action-card p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* Nearby Users Section */
.nearby-users-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.nearby-users-list {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    min-height: 150px;
}

.no-users-message {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.user-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.user-distance {
    font-size: 12px;
    color: #666;
}

/* Screen Content */
.screen-content {
    padding: 20px;
    min-height: calc(100vh - 140px);
}

.screen-content h2 {
    margin-bottom: 20px;
    color: #333;
}

/* Profile Screen */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.profile-photo-section {
    text-align: center;
    margin-bottom: 30px;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item label {
    font-weight: 600;
    color: #333;
}

.info-item span {
    color: #666;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal input {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.modal input:focus {
    outline: none;
    border-color: #667eea;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #333;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .main-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.text-muted {
    color: #666;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}