
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #f6f6f2, #f5f5f5);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    text-align: center;
    border-bottom: 1px solid #e6e6e6;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(90deg, 
        #ffd166 20%, 
        #f9b5ac 40%, 
        #a6dcef 60%, 
        #c3e8bd 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
}

.container {
    display: flex;
    max-width: 1200px;
    margin: 80px auto 20px;
    padding: 0 15px;
}

.feed-column {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
    position: relative;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 10px;
}

.pagination-button {
    background: linear-gradient(90deg, #a6dcef, #c3e8bd);
    border: none;
    color: #333;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.pagination-button:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.pagination-button:disabled {
    background: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.post-group {
    display: none;
}

.post-group.active {
    display: block;
}

.feed-label {
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #555;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 8px;
}

.post {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f1f1f1;
}

.post-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-username {
    font-weight: 600;
    font-size: 14px;
    color: #262626;
}

.post-time {
    margin-left: auto;
    font-size: 12px;
    color: #8e8e8e;
}

.post-image {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    padding: 12px;
}

.post-caption {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-likes {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

/* Match indicator removed */

.match-button {
    display: none;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #a6dcef, #c3e8bd);
    border: none;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
    transition: all 0.3s ease;
}

.match-button:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

.matching-posts .match-button {
    display: block;
}

.time-difference-bar {
    display: none;
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #a6dcef, #c3e8bd);
    color: #333;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}

.matching-posts {
    border: 2px solid transparent;
    border-image: linear-gradient(45deg, #ffd166, #f9b5ac, #a6dcef, #c3e8bd);
    border-image-slice: 1;
    animation: pulse 2s infinite;
    position: relative;
    box-shadow: 0 0 15px rgba(166, 220, 239, 0.6);
    transform: scale(1.02);
    z-index: 5;
    transition: all 0.3s ease;
    margin-top: 35px; /* Make space for the time difference bar */
}

.matching-posts .time-difference-bar {
    display: block;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(166, 220, 239, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(166, 220, 239, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(166, 220, 239, 0);
    }
}

#merged-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.merged-content {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    text-align: center;
}

.merged-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    margin-bottom: 15px;
}

.close-button {
    background: linear-gradient(90deg, #ffd166, #f9b5ac);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 209, 102, 0.3);
    border-radius: 50%;
    border-top-color: #ffd166;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.close-button:hover {
    transform: scale(1.05);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c3e8bd;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a6dcef;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        margin-top: 70px;
    }
    
    .feed-column {
        max-height: none;
    }
}
