/* Global Styles & Reset */
:root {
    --bg-body: #1e1e1e;
    --text-main: #e0e0e0;
    --text-title: #ffffff;
    --text-muted: #bbbbbb;
    --text-label: #aaaaaa;
    
    --bg-container: transparent;
    --border-container: none;
    --shadow-container: none;
    
    --bg-input: #2d2d2d;
    --border-input: #444444;
    --bg-input-focus: #1a1a1a;
    
    --color-primary: #AD61FF;
    --color-primary-hover: #AD61FF;
    --color-primary-focus: rgba(173, 97, 255, 0.2);
    --text-primary: #ffffff;

    --bg-element: #2d2d2d;
    --bg-element-hover: #3d3d3d;
    --border-element: #444444;

    --bg-match-count: rgba(102, 176, 255, 0.2);
    --text-match-count: #66b0ff;
    
    --bg-error: rgba(220, 53, 69, 0.2);
    --border-error: rgba(220, 53, 69, 0.5);
    --text-error: #ff6b6b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    background: url(images/back3.png);
    background-size: cover;
    background-repeat: no-repeat;
}

/* Minimalist Container */
.container {
    background: var(--bg-container);
    border: var(--border-container);
    box-shadow: var(--shadow-container);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    margin-top: 2vh;
}

h1,
h2,
h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-title);
    font-weight: 700;
}

p.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-label);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--text-main);
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    background: var(--bg-input-focus);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-focus);
}

input[type="file"] {
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
}

/* Buttons */
.btn {
    background: var(--color-primary);
    color: var(--text-primary);
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

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

.btn:active {
    transform: scale(0.98);
}

.link,
.btn-secondary {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.link:hover,
.btn-secondary:hover {
    text-decoration: underline;
}

/* Interests Bubbles for other places */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.interest-checkbox {
    display: none;
}

.interest-label {
    background: var(--bg-element);
    border: 1px solid var(--border-element);
    padding: 10px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s ease;
    user-select: none;
}

.interest-checkbox:checked+.interest-label {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--text-primary);
}

.interest-label:hover {
    background: var(--bg-element-hover);
}

.interest-checkbox:checked+.interest-label:hover {
    background: var(--color-primary-hover);
}

/* Profile specific */
.profile-img-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    border: 2px solid var(--border-element);
    padding: 3px;
    background: var(--bg-container);
}

.bubble-map {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.bubble {
    background: var(--bg-element);
    color: var(--text-muted);
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--border-element);
}

/* Match list */
.match-list {
    margin-top: 30px;
}

.match-item {
    background: var(--bg-element);
    border: 1px solid var(--border-element);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.match-item:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
}

.match-img {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-element);
}

.match-info h4 {
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--text-title);
    text-align: left;
}

.match-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.4;
}

.match-count {
    background: var(--bg-match-count);
    color: var(--text-match-count);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 5px;
}

.error-msg {
    background: var(--bg-error);
    color: var(--text-error);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
    border: 1px solid var(--border-error);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-element);
    padding-bottom: 15px;
}

.header-bar h3 {
    margin: 0;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .container {
        padding: 20px;
        border-radius: 12px;
        margin-top: 2vh;
    }

    .profile-img-lg {
        width: 100px;
        height: 100px;
    }
}

/* Hide Leaflet Attribution */
.leaflet-control-attribution {
    display: none !important;
}