.cf-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background-color: #0F0F0F;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #FFFFFF;
}

.cf-scroll-wrapper {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Firefox */
}

.cf-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.cf-card {
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 12px;
    position: relative;
    border-bottom: 1px solid #2A2A2B;
}

/* Header styling */
.cf-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cf-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #252526;
    border: 2px solid #FF4500;
}

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

.cf-user-info {
    display: flex;
    flex-direction: column;
}

.cf-username {
    font-size: 13px;
    font-weight: 600;
}

.cf-time {
    font-size: 11px;
    color: #888888;
}

.cf-tag {
    margin-left: auto;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    background: #2A2A2B;
    font-weight: bold;
}

/* Media styling */
.cf-media-area {
    position: relative;
    flex-grow: 1;
    margin: 8px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
}

/* Sidebar action items */
.cf-action-sidebar {
    position: absolute;
    right: 12px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    z-index: 5;
}

.cf-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    transition: transform 0.2s;
}

.cf-action-item:hover {
    transform: scale(1.15);
}

.cf-action-item svg {
    filter: drop-shadow(0px 2px 5px rgba(0,0,0,0.5));
}

.cf-counter {
    font-size: 11px;
    margin-top: 4px;
    font-weight: bold;
}

/* Heart pop animation for Double-Tap */
.cf-double-tap-heart {
    position: absolute;
    font-size: 80px;
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
    z-index: 10;
}

.cf-double-tap-heart.animate {
    opacity: 1;
    transform: scale(1);
}

/* Caption Area */
.cf-caption {
    padding: 8px 4px;
}

.cf-caption h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: bold;
}

.cf-caption h3 a {
    color: #FFF;
    text-decoration: none;
}

.cf-caption h3 a:hover {
    text-decoration: underline;
}

.cf-excerpt {
    font-size: 12px;
    color: #CCCCCC;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Indicators tracking dots */
.cf-indicators {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.cf-indicator {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: background 0.3s, transform 0.3s;
}

.cf-indicator.active {
    background: #FF4500;
    transform: scale(1.3);
}

/* Ending viral grid card */
.cf-ending-card {
    justify-content: flex-start;
    padding-top: 24px;
    background: radial-gradient(circle at top, #23112E 0%, #0F0F0F 100%);
}

.cf-ending-header {
    text-align: center;
    margin-bottom: 16px;
}

.cf-ending-header h2 {
    font-size: 20px;
    color: #FF4500;
    margin: 0 0 4px 0;
}

.cf-ending-header p {
    font-size: 12px;
    color: #AAA;
    margin: 0;
}

.cf-grid-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    flex-grow: 1;
    margin-bottom: 16px;
}

.cf-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 130px;
}

.cf-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cf-gallery-item:hover img {
    transform: scale(1.1);
}

.cf-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 6px;
    display: flex;
    justify-content: flex-end;
    font-size: 11px;
    font-weight: bold;
}

.cf-restart-btn-container {
    text-align: center;
    padding-bottom: 10px;
}

.cf-restart-btn {
    background: #FF4500;
    color: #FFF;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.cf-restart-btn:hover {
    background-color: #E03D00;
    transform: scale(1.05);
}
