@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #B9E4C2;
    min-height: 100vh;
    line-height: 1.6;
    color: #2c3e50;
    letter-spacing: -0.01em;
    position: relative;
    overflow-x: hidden;
}

/* Organic flowing background with soft green and peach colors */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, #B9E4C2 0%, #B9E4C2 80%, #A6D4B3 87%, #8FD3A2 94%, #7CB342 100%);
    background-image: 
        radial-gradient(circle at 5% 90%, #A6D4B3 0%, transparent 4%),
        radial-gradient(circle at 95% 90%, #A6D4B3 0%, transparent 4%);
    background-size: 60px 60px, 60px 60px;
    background-repeat: no-repeat;
    background-position: 5% 90%, 95% 90%;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFEBD9;
    clip-path: path('M 0 120 C 100 90, 200 150, 400 120 C 600 90, 800 150, 1000 120 C 1200 90, 1400 150, 1600 120 L 1600 350 C 1400 380, 1200 320, 1000 350 C 800 380, 600 320, 400 350 C 200 380, 100 320, 0 350 Z');
    transform: scale(1.2);
    z-index: -1;
}

/* Same background for login screen */
body.login-screen {
    background: #B9E4C2;
}

body.login-screen::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, #B9E4C2 0%, #B9E4C2 80%, #A6D4B3 87%, #8FD3A2 94%, #7CB342 100%);
    background-image: 
        radial-gradient(circle at 5% 90%, #A6D4B3 0%, transparent 4%),
        radial-gradient(circle at 95% 90%, #A6D4B3 0%, transparent 4%);
    background-size: 60px 60px, 60px 60px;
    background-repeat: no-repeat;
    background-position: 5% 90%, 95% 90%;
    z-index: -2;
}

body.login-screen::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFEBD9;
    clip-path: path('M 0 120 C 100 90, 200 150, 400 120 C 600 90, 800 150, 1000 120 C 1200 90, 1400 150, 1600 120 L 1600 350 C 1400 380, 1200 320, 1000 350 C 800 380, 600 320, 400 350 C 200 380, 100 320, 0 350 Z');
    transform: scale(1.2);
    z-index: -1;
}

/* Removed old gradient animation - now using organic background */

/* Fun App Title Styling */
.app-title {
    margin: 0;
    font-family: 'Fredoka', 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 3.4em;
    letter-spacing: -0.03em;
    text-align: center;
    position: relative;
    animation: titleBounce 3s ease-in-out infinite;
}

.title-hi {
    color: #F97316;
    display: inline-block;
    transform-origin: center bottom;
    animation: bounce1 2s ease-in-out infinite;
}

.title-lo {
    color: #F97316;
    display: inline-block;
    transform-origin: center bottom;
    animation: bounce2 2s ease-in-out infinite 0.3s;
}

.title-buffalo {
    color: #F97316;
    display: inline-block;
    transform-origin: center bottom;
    animation: bounce3 2s ease-in-out infinite 0.6s;
}

/* Orange title for main app (non-login) */
body:not(.login-screen) .title-hi {
    color: #F97316;
}

body:not(.login-screen) .title-lo {
    color: #F97316;
}

body:not(.login-screen) .title-buffalo {
    color: #F97316;
}

/* App subtitle styling */
.app-subtitle {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Main app subtitle styling */
body:not(.login-screen) .app-subtitle {
    color: #6C757D;
    text-shadow: none;
}

@keyframes bounce1 {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(0deg); }
    40% { transform: translateY(-8px) rotate(-2deg); }
    60% { transform: translateY(-4px) rotate(1deg); }
}

@keyframes bounce2 {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-6px) scale(1.05); }
    60% { transform: translateY(-2px) scale(1.02); }
}

@keyframes bounce3 {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(0deg); }
    40% { transform: translateY(-10px) rotate(2deg); }
    60% { transform: translateY(-5px) rotate(-1deg); }
}

@keyframes titleBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}



/* Enhanced title shadow effect */
.app-title::before {
    content: 'HiLoBuffalo';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translate(2px, 2px);
    filter: blur(1px);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Main app container - transparent to show background */
body:not(.login-screen) .container {
    background: transparent;
    border-radius: 24px;
    margin-top: 20px;
}

/* Buffalo Icon Styles */
.buffalo-icon {
    background-image: url('/buffalo-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    width: 32px;
    height: 32px;
}

.buffalo-icon-inline {
    width: 32px;
    height: 32px;
    vertical-align: middle;
}

.buffalo-icon-small {
    width: 24px;
    height: 24px;
}

.buffalo-icon-medium {
    width: 64px;
    height: 64px;
}

/* Giant Buffalo Save Animation */
.buffalo-save-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background-image: url('/buffalo-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 9999;
    opacity: 0;
    animation: buffaloSaveAnimation 2s ease-out forwards;
    pointer-events: none;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background-color: transparent !important;
    background-clip: content-box !important;
    -webkit-background-clip: content-box !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
}

@keyframes buffaloSaveAnimation {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    75% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

.buffalo-icon-large {
    width: 96px;
    height: 96px;
}

/* Animation for floating buffalo */
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.floating {
    animation: gentleFloat 3s ease-in-out infinite;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-group input:focus {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    background: white;
}

/* Modern Card Sections */
.section {
    margin-bottom: 24px;
    padding: 32px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.section.high {
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    color: white;
}

.section.low {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.section.buffalo {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 25%, #FFD700 50%, #667eea 75%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.section.buffalo::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 20px
    );
    animation: buffalo-stripes 3s linear infinite;
    pointer-events: none;
}

@keyframes buffalo-stripes {
    0% { transform: translateX(-20px) translateY(-20px); }
    100% { transform: translateX(20px) translateY(20px); }
}

.section.buffalo:hover {
    transform: translateY(-2px) rotate(1deg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.section.buffalo:hover::before {
    animation-duration: 1s;
}

.section h3 {
    margin-bottom: 20px;
    font-size: 1.4em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.section textarea {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.95);
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section textarea:focus {
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    background: white;
}

.section.high textarea, .section.low textarea, .section.buffalo textarea {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
}

.section.high textarea:focus, .section.low textarea:focus, .section.buffalo textarea:focus {
    background: white;
}

/* Sharing Options */
.sharing-options {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 25px;
    margin-top: 30px;
    backdrop-filter: blur(10px);
}

.sharing-options h3 {
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

.sharing-section {
    margin-bottom: 20px;
}

.sharing-section h4 {
    margin-bottom: 12px;
    font-size: 1.1em;
    font-weight: 500;
    color: #555;
}

/* Custom Checkbox Styles */
.archive-checkbox-label, .group-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.archive-checkbox-label:hover, .group-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}

.archive-styled-checkbox, .group-styled-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.archive-checkmark, .group-checkmark {
    height: 20px;
    width: 20px;
    border-radius: 4px;
    border: 2px solid #ddd;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.archive-styled-checkbox:checked ~ .archive-checkmark {
    background: #28a745;
    border-color: #28a745;
}

.group-styled-checkbox:checked ~ .group-checkmark {
    background: #007bff;
    border-color: #007bff;
}

.archive-checkmark:after, .group-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.archive-styled-checkbox:checked ~ .archive-checkmark:after,
.group-styled-checkbox:checked ~ .group-checkmark:after {
    display: block;
}

.archive-checkmark:after, .group-checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.archive-text, .group-text {
    font-weight: 500;
    color: #333;
}

/* Button Styles */
.submit-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #FF9500 0%, #FFB74D 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(255, 149, 0, 0.3);
    letter-spacing: -0.02em;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(255, 149, 0, 0.4);
    background: linear-gradient(135deg, #FF8F00 0%, #FFA726 100%);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    margin-right: 10px;
    margin-bottom: 10px;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.cancel-btn {
    background: rgba(108, 117, 125, 0.1);
    border: 2px solid rgba(108, 117, 125, 0.3);
    color: #6c757d;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.cancel-btn:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
}

.delete-btn {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.2);
    transform: translateY(-1px);
}

/* Tab Navigation */
.tab-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
    padding: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Individual colorful tab buttons */
.tab-btn {
    padding: 24px 12px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 60px;
}

.tab-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.tab-btn.active {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Specific colors for each tab */
.tab-btn[data-tab="share"] {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
}

.tab-btn[data-tab="groups"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.tab-btn[data-tab="feed"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.tab-btn[data-tab="archive"] {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
}

/* Login screen tab styling */
body.login-screen .tab-nav {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    justify-content: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.login-screen .tab-btn {
    flex: 1;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: none;
    padding: 14px 20px;
}

body.login-screen .tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
    box-shadow: none;
}

body.login-screen .tab-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: #FF9500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Enhanced Entry Styles */
.entry, .feed-entry {
    background: linear-gradient(145deg, #FFFFFF, #FAFBFC);
    border: 2px solid #E1E8ED;
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 28px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: visible;
}

/* Grass decorations using your provided image */
.grass-decoration {
    position: fixed;
    width: 72px;
    height: 72px;
    background-image: url('/grass-decoration.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

/* Bottom grass decorations - positioned higher to sit on green background */
.grass-decoration.bottom {
    bottom: 25px;
}

/* Top grass decorations */
.grass-decoration.top {
    top: 15px;
}

/* Bottom grass positioning */
.grass-blade-1 {
    left: 5%;
}

.grass-blade-2 {
    left: 25%;
    transform: scale(0.7);
}

.grass-blade-3 {
    right: 20%;
    transform: scale(0.9);
}

.grass-blade-4 {
    right: 5%;
    transform: scale(0.8);
}

/* Top grass positioning with varied heights for natural look */
.grass-blade-top-1 {
    left: 15%;
    top: 45px !important;
    transform: scale(0.8);
}

.grass-blade-top-2 {
    right: 25%;
    top: 8px !important;
    transform: scale(0.6);
}

.grass-blade-top-3 {
    right: 8%;
    top: 35px !important;
    transform: scale(0.9);
}

.entry::before, .feed-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #FF6B00, #FF9500, #FFA726, #FFB74D);
    border-radius: 24px 24px 0 0;
}

.entry:hover, .feed-entry:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.06);
    background: linear-gradient(145deg, #FFFFFF, #F8FAFC);
    border-color: #FF9500;
}

.entry-section {
    margin-bottom: 20px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #FEFEFE, #F8FAFC);
    border: 1px solid #E3E8EF;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.entry-section:hover {
    transform: translateX(3px);
    background: linear-gradient(135deg, #FFFFFF, #FAFBFC);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #D1D9E0;
}

.entry-section strong {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2c3e50;
    position: relative;
    padding-left: 16px;
}

.feed-entry .entry-section.high-section strong::before,
.entry-section.high-section strong::before {
    content: '';
    width: 8px;
    height: 100%;
    background: linear-gradient(135deg, #FF6B35, #F7931E) !important;
    border-radius: 3px;
    position: absolute;
    left: 0;
    top: 0;
}

.feed-entry .entry-section.low-section strong::before,
.entry-section.low-section strong::before {
    content: '';
    width: 8px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-radius: 3px;
    position: absolute;
    left: 0;
    top: 0;
}

/* Debug rules - force purple color for Low section */
.entry-section.low-section strong::before {
    background: #667eea !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
}

/* Specific targeting for archive and feed Low sections */
#archiveContent .entry-section.low-section strong::before,
#feedContent .entry-section.low-section strong::before {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    content: '' !important;
    width: 8px !important;
    height: 100% !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    border-radius: 3px !important;
}

.feed-entry .entry-section.buffalo-section strong::before,
.entry-section.buffalo-section strong::before {
    content: '';
    width: 8px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-radius: 3px;
    position: absolute;
    left: 0;
    top: 0;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1), rgba(255, 107, 53, 0.05));
    border-radius: 16px;
    border: 1px solid rgba(255, 149, 0, 0.2);
    position: relative;
}

.feed-header::before {
    content: '👤';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    background: linear-gradient(135deg, #FF9500, #FF6B35);
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
}

.feed-author {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
    margin-left: 25px;
}

.feed-date {
    color: #7f8c8d;
    font-size: 13px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Enhanced Reaction Styles */
.reactions {
    margin-top: 20px;
    padding: 18px 0;
    border-top: 2px solid rgba(255, 149, 0, 0.1);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.5), rgba(255, 255, 255, 0.3));
    border-radius: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.reaction-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
    border: 2px solid rgba(102, 126, 234, 0.15);
    padding: 10px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.reaction-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.reaction-btn:hover::before {
    left: 100%;
}

.reaction-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 0.95));
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.reaction-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Comments */
.comments {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.comment {
    background: rgba(248, 249, 250, 0.8);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
}

.comment-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.comment-text {
    color: #555;
    margin-bottom: 5px;
}

.comment-time {
    font-size: 0.8em;
    color: #666;
}

.comment-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 12px;
}

.comment-delete:hover {
    color: #dc3545;
}

.comment-form {
    margin-top: 10px;
}

.comment-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.comment-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.comment-submit {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
    transition: all 0.2s;
}

.comment-submit:hover {
    background: #5a6fd8;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #c3e6cb;
    padding: 20px;
    border-radius: 16px;
    margin-top: 25px;
    margin-bottom: 0;
    text-align: center;
    font-weight: 600;
    position: relative;
    animation: successPop 0.6s ease-out;
    box-shadow: 0 8px 25px rgba(21, 87, 36, 0.15);
}

@keyframes successPop {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.success-message::before {
    content: '✨';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 24px;
    animation: sparkle 1s ease-in-out infinite alternate;
}

@keyframes sparkle {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(15deg); }
}

/* User Setup */
.user-setup {
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(25px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.user-setup h2 {
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 700;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.no-groups-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Group Management */
.groups-container {
    text-align: center;
}

.group-actions {
    margin: 20px 0;
}

.form-section {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 24px;
    margin-top: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.form-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.form-section input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    margin-bottom: 20px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    color: #2c3e50;
    font-family: 'Poppins', sans-serif;
}

.form-section input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 8px 25px rgba(0, 0, 0, 0.12);
    background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(252, 254, 255, 0.95));
    transform: translateY(-2px) scale(1.02);
}

.form-section input::placeholder {
    color: #7f8c8d;
    font-weight: 400;
}

/* Feed Group Selector */
.feed-group-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(210, 105, 30, 0.3);
    color: #333;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-right: 10px;
    margin-bottom: 10px;
}

.feed-group-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.feed-group-btn.active {
    background: #D2691E;
    color: white;
    border-color: #D2691E;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .tab-nav {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 45%;
        margin-bottom: 5px;
    }
    
    .section {
        padding: 20px;
    }
    
    .user-setup {
        padding: 25px;
    }
    
    /* Prevent zoom on input focus for iPhone */
    input, textarea, select {
        font-size: 16px !important;
    }
    
    /* Improve touch targets */
    button, .dropdown-item, .tab-btn {
        min-height: 44px;
    }
    
    /* Better spacing for mobile */
    .share-prompt-card {
        margin-bottom: 15px !important;
        padding: 20px !important;
    }
}

/* Profile Selector Styles */
.profile-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.profile-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 120px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.profile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(102, 126, 234, 0.1);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-name {
    font-weight: 500;
    text-align: center;
    font-size: 14px;
    color: #2c3e50;
}

.add-profile-btn {
    border-style: dashed !important;
    color: rgba(102, 126, 234, 0.7);
}

.add-profile-btn:hover {
    color: rgba(102, 126, 234, 1);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 32px;
    border-radius: 20px;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
}

/* Avatar Selector */
.avatar-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin: 10px 0;
}

.avatar-option {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-option:hover {
    border-color: rgba(102, 126, 234, 0.6);
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
}

.secondary-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.sign-out-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

.sign-out-btn:hover {
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Network status styles */
.network-status {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.network-status.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.network-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Enhanced form validation styles */
.form-field.error input, .form-field.error textarea {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-field.error .field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Enhanced button loading states */
.btn-uploading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-uploading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50, #81C784) !important;
    color: white !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
    box-shadow: 0 12px 40px rgba(76, 175, 80, 0.3) !important;
}

/* Robust button states */
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Media Upload Styles */
.media-upload-options {
    margin-top: 15px;
}

.media-upload-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.media-btn {
    background: white;
    border: 2px solid rgba(255, 149, 0, 0.2);
    color: #FF9500;
    padding: 14px 18px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    min-width: 140px;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.08);
}

.media-btn:hover {
    background: rgba(255, 149, 0, 0.05);
    border-color: rgba(255, 149, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 149, 0, 0.15);
}

.media-btn.recording {
    background: #dc2626 !important;
    color: white !important;
    border: 2px solid #dc2626 !important;
    animation: recordingPulse 1s infinite;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.3);
}

.media-btn.recording:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: white !important;
}

/* Recording state timer styling */
#liveRecordingTimer {
    color: white !important;
    font-weight: 700 !important;
}

/* Recording state text styling */
.media-btn.recording #recordingState {
    color: white !important;
}

.media-btn.recording #recordingState span {
    color: white !important;
}

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

@keyframes recordingPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.1); }
    100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.3); }
}

@keyframes recordingBlink {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.media-preview {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
    position: relative;
}

.media-preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.media-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.voice-recording-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #667eea;
    margin-bottom: 10px;
}

.voice-recording-status.recording {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    padding: 12px;
    border-radius: 12px;
    border: 2px solid rgba(220, 38, 38, 0.3);
    animation: recordingGlow 2s infinite;
}

.voice-recording-status.recording #recordingIndicator {
    animation: recordingBlink 0.8s infinite;
    font-size: 24px;
}

.voice-recording-status.recording #recordingTime {
    font-size: 20px;
    font-weight: 700;
    color: #dc2626;
    text-shadow: 0 0 8px rgba(220, 38, 38, 0.3);
}

@keyframes recordingGlow {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.1); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
}

.remove-media-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.remove-media-btn:hover {
    background: #e55353;
    transform: scale(1.1);
}

/* Enhanced Audio player styling */
audio {
    width: 100%;
    max-width: 350px;
    margin-top: 15px;
    height: 45px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
}

audio:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    transform: scale(1.02);
}

audio::-webkit-media-controls-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border-radius: 20px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .media-upload-buttons {
        flex-direction: column;
    }
    
    .media-btn {
        width: 100%;
        min-width: unset;
    }
    
    .media-preview {
        margin: 10px 0;
    }
}

/* Entry media display styles */
.entry-media {
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.entry-photo {
    margin-bottom: 10px;
}

.entry-photo img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.entry-photo img:hover {
    transform: scale(1.02);
}

.entry-voice {
    margin-top: 10px;
}

.voice-note-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #667eea;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
    padding: 12px 16px;
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.voice-icon {
    font-size: 18px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Voice Player for Archive */
.custom-voice-player {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.05));
    border: 2px solid rgba(102, 126, 234, 0.15);
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    user-select: none;
}

.custom-voice-player:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.08));
    border-color: rgba(102, 126, 234, 0.25);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.custom-voice-player:active {
    transform: translateY(0);
}

.voice-player-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.voice-play-button {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.voice-play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.voice-play-button.playing {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: pulse 2s infinite ease-in-out;
}

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

.voice-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.voice-label {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-status {
    font-size: 14px;
    color: #666;
    opacity: 0.8;
}

.play-icon, .pause-icon {
    display: inline-block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Legacy audio controls (hidden) */
.entry-voice audio {
    display: none;
}

/* Photo modal styles */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.photo-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.photo-modal-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.photo-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Media display in feed entries */
.feed-entry .entry-media {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.archive-entry .entry-media {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Group Members Modal Styling */
#groupMembersModal .modal-content {
    max-width: 500px;
    min-height: 200px;
}

#groupMembersTitle {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(102, 126, 234, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

#groupMembersList {
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

/* Custom scrollbar for member list */
#groupMembersList::-webkit-scrollbar {
    width: 8px;
}

#groupMembersList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

#groupMembersList::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

#groupMembersList::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Enhanced member item hover effects */
.member-item {
    cursor: default;
}

/* Group members modal close button styling */
#groupMembersModal .cancel-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#groupMembersModal .cancel-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a5acd);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Sharing Modal Specific Styles */
#sharingModal .modal-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    border: 2px solid rgba(255, 107, 0, 0.1);
    box-shadow: 0 25px 80px rgba(255, 107, 0, 0.15);
    padding: 0;
}

/* Sharing modal scrollable layout */
#sharingModal .modal-header {
    padding: 32px 32px 0 32px;
    flex-shrink: 0;
}

#sharingModal .modal-body {
    padding: 20px 32px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(85vh - 160px); /* Account for header and footer */
}

#sharingModal .modal-footer {
    padding: 0 32px 32px 32px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 107, 0, 0.1);
    margin-top: 20px;
    padding-top: 20px;
}

/* Custom scrollbar for sharing modal */
#sharingModal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#sharingModal .modal-body::-webkit-scrollbar-track {
    background: rgba(255, 107, 0, 0.05);
    border-radius: 3px;
}

#sharingModal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 0, 0.3);
    border-radius: 3px;
}

#sharingModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 0, 0.5);
}

#sharingModal h3 {
    color: #FF6B00;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
}

#sharingModal .sharing-section {
    margin: 20px 0;
}

#sharingModal h4 {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
}

#sharingModal .group-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#sharingModal .group-checkbox-label:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

#sharingModal .group-styled-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

#sharingModal .group-text {
    color: #2c3e50;
    font-weight: 500;
}

#sharingModal #confirmShare {
    background: linear-gradient(135deg, #FF6B00 0%, #FF9500 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#sharingModal #confirmShare:hover {
    background: linear-gradient(135deg, #FF5722 0%, #FF8A00 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.3);
}

#sharingModal .cancel-btn {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 2px solid rgba(108, 117, 125, 0.2);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sharingModal .cancel-btn:hover {
    background: rgba(108, 117, 125, 0.15);
    border-color: rgba(108, 117, 125, 0.3);
}

/* Buffalo cloud shapes */
.buffalo-cloud {
    position: fixed;
    top: 15%;
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    z-index: 0;
    opacity: 0.7;
    animation: driftCloud 30s linear infinite;
    pointer-events: none;
}

.buffalo-cloud::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 15px;
    width: 30px;
    height: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.buffalo-cloud::after {
    content: '';
    position: absolute;
    top: -6px;
    right: 10px;
    width: 20px;
    height: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.buffalo-cloud-1 {
    animation-delay: 0s;
    top: 12%;
}

.buffalo-cloud-2 {
    animation-delay: 15s;
    top: 20%;
    transform: scale(0.7);
}

.buffalo-cloud-3 {
    animation-delay: 22s;
    top: 8%;
    transform: scale(0.9);
}

@keyframes driftCloud {
    0% {
        left: -80px;
        transform: translateY(0px);
    }
    25% {
        transform: translateY(-10px);
    }
    50% {
        transform: translateY(5px);
    }
    75% {
        transform: translateY(-5px);
    }
    100% {
        left: calc(100vw + 80px);
        transform: translateY(0px);
    }
}







