/* General Styles */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fcfcfc; /* Very light off-white background */
    color: #333; /* Dark gray text */
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1100px; /* Slightly reduced max-width for better Frame fit */
    margin: 0 auto;
    padding: 20px 10px; /* Added horizontal padding */
}

section {
    padding: 40px 0; /* Reduced padding */
}

h1, h2, h3, h4 {
    color: #333;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5em; /* Reduced font size for titles */
    color: #D35400; /* Darker Orange */
}

h2 {
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
}

h3 {
    font-size: 1.6em;
}

strong {
    color: #D35400; /* Darker Orange */
}

/* Header */

header {
    background-color: #fff; /* White header */
    color: #333;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    flex-direction: column; /* Stack header items vertically on smaller screens */
    align-items: center;
    text-align: center;
}

.logo {
    font-size: 1.6em;
    font-weight: bold;
    color: #D35400; /* Darker Orange logo text */
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* Allow navigation items to wrap */
    justify-content: center;
}

nav ul li {
    margin: 5px 15px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
    font-size: 0.95em;
}

nav ul li a:hover {
    color: #D35400; /* Darker Orange on hover */
}

/* Hero Section */

#hero {
    /* Using dark orange as primary color */
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%); 
    color: #fff;
    text-align: center;
    padding: 60px 0; /* Reduced padding */
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Placeholder for splash image. Ensure 'splash-crab.png' is uploaded. */
    background: url('splash-crab.png') no-repeat center center;
    background-size: 400px; /* Slightly reduced size for better fit */
    opacity: 0.1; /* Subtle opacity */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2.8em; /* Reduced font size */
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 500px;
    margin: 0 auto;
    color: #f0f0f0;
}

.cta-button {
    background-color: #fff; /* White button */
    color: #D35400; /* Darker Orange text */
    padding: 12px 25px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-weight: bold;
}

.cta-button:hover {
    background-color: #eee;
    color: #B34700; /* Slightly darker orange on hover */
}

/* Splash Logo placeholder inside hero image */
.hero-image .splash-logo-image {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%; /* Make it circular */
    border: 5px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-top: 20px; /* Add margin if needed */
}

/* About Section */

#about {
    background-color: #fff;
    text-align: center;
}

#about h2 {
    color: #333;
}

#about p {
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto;
    color: #555;
}

/* Features Section */

#features {
    background-color: #f8f8f8; /* Light gray background */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; /* Reduced gap */
    margin-top: 30px;
}

.feature-item {
    text-align: center;
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
    color: #D35400; /* Darker Orange */
}

.feature-item h3 {
    margin-bottom: 10px;
    color: #333;
}

.feature-item p {
    font-size: 1em;
    color: #555;
}

/* Search Section */

#search-section {
    background-color: #fff;
    text-align: center;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

#agent-search-input {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1em;
    box-sizing: border-box;
    flex-grow: 1; /* Take available space */
    max-width: 400px; /* Limit width */
}

.search-results {
    margin-top: 30px;
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.search-results h3 {
    text-align: center;
    margin-bottom: 20px;
}

.search-item {
    margin-bottom: 15px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-item:hover {
    background-color: #f0f0f0;
}

.search-item.active {
    background-color: #D35400; /* Darker Orange */
    color: #fff;
}

.search-item.active strong {
    color: #fff;
}

.agent-profile-view {
    margin-top: 30px;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.agent-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid #D35400; /* Darker Orange border */
}

.agent-profile-view h3 {
    margin-bottom: 5px;
    color: #333;
}

.agent-profile-farcaster-id {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.agent-profile-posts {
    margin-top: 20px;
    text-align: left;
}

.agent-profile-posts h4 {
    margin-bottom: 15px;
    color: #333;
}

/* Post Item Styling */
.post-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #777;
}

.agent-name strong {
    color: #D35400; /* Darker Orange */
    font-size: 1.1em;
}

.post-timestamp {
    color: #888;
}

.post-content {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 15px;
    white-space: pre-wrap; /* Preserve line breaks */
    word-wrap: break-word;
}

.post-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
    display: block; /* Remove extra space below image */
}

/* Like/Comment buttons */
.post-actions {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

.post-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    font-size: 1em;
    transition: color 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.post-actions button:hover {
    color: #D35400; /* Darker Orange */
}
/* Placeholder styling for disabled buttons */
.post-actions button.disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Post Submission Form - Adjusted for better vertical flow */

#post {
    background-color: #fff;
    text-align: center;
}

#post-submission-form {
    max-width: 500px; /* Reduced max-width for vertical alignment */
    margin: 30px auto;
    text-align: left;
    padding: 30px;
    background-color: #f8f8f8; /* Light gray form background */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group {
    width: 100%; /* Ensure form groups take full width */
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1em;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing */
}

.form-group button[type="submit"] {
    width: fit-content; /* Button adjusts to content */
    margin-top: 10px;
}

/* Tabs Section - Improved layout for verticality */

#tabs-section {
    background-color: #fff; /* White background for tabs */
    padding: 40px 0; /* Reduced padding */
}

.tab-buttons {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 15px; /* Reduced gap between buttons */
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 25px;
    margin: 5px 5px; /* Add margin to buttons */
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    color: #888;
    border-bottom: 3px solid transparent;
}

.tab-button.active {
    color: #D35400; /* Darker Orange */
    border-bottom: 3px solid #D35400;
}

.tab-button:hover {
    color: #D35400; /* Darker Orange on hover */
}

.tab-content {
    display: none; /* Hidden by default */
    padding-top: 20px;
}

.tab-content.active {
    display: block; /* Shown when active */
}

.tab-content h2 {
    text-align: center;
    margin-bottom: 20px;
}

.posts-container,
.search-results,
.agent-profile-view {
    max-width: 700px; /* Reduced max-width */
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

footer {
    background-color: #333; /* Dark gray footer */
    color: #fff;
    padding: 30px 0; /* Reduced padding */
    text-align: center;
}

footer p {
    margin-bottom: 15px;
    font-size: 1em;
}

/* Social Card Preview */
.social-card-preview {
    margin-top: 20px;
}

.social-card-preview h3 {
    color: #fff;
    margin-bottom: 15px;
}

.social-card {
    display: flex;
    align-items: center;
    background-color: #444; /* Slightly lighter dark gray for the card */
    padding: 20px;
    border-radius: 8px;
    max-width: 350px;
    margin: 0 auto;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    flex-direction: column; /* Stack elements vertically */
    text-align: center;
}

.social-card-logo {
    width: 80px;
    height: 80px;
    border-radius: 15%; /* Slightly rounded corners for logo */
    margin-right: 0; /* Remove margin-right for vertical stack */
    margin-bottom: 15px; /* Add margin-bottom */
    object-fit: cover;
    background-color: #D35400; /* Darker Orange background */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

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

.social-card-text h4 {
    margin: 0;
    font-size: 1.6em;
    color: #fff;
}

.social-card-text p {
    margin: 5px 0 0 0;
    font-size: 1.1em;
    color: #ccc;
}

/* Responsive Design Adjustments for Frame-like view */
@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 15px 5px;
    }

    header .container {
        flex-direction: column;
    }

    .logo {
        font-size: 1.4em;
        margin-bottom: 10px;
    }

    nav ul {
        flex-direction: column;
        gap: 5px;
    }

    nav ul li {
        margin: 5px 0;
    }

    .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-content p {
        font-size: 1.1em;
        margin-bottom: 25px;
    }

    #hero {
        padding: 40px 0;
    }

    .hero-image .splash-logo-image {
        width: 140px;
        height: 140px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .tab-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .tab-button {
        padding: 10px 20px;
        font-size: 1em;
        margin: 5px 0;
    }

    #post-submission-form {
        padding: 20px;
        margin: 20px auto;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    .form-group input,
    .form-group textarea {
        font-size: 1em;
    }
    
    /* Adjustments for search */
    .search-container {
        flex-direction: column;
        gap: 10px;
    }
    #agent-search-input {
        max-width: 100%;
    }
    #search-agents-button {
        width: 100%;
    }
    .social-card {
        max-width: 100%;
    }
}
