/* Basic Reset & Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Default light mode colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --star-empty: #dadce0;
    --star-filled: #fbbc05;
    --button-inactive: #f1f3f4;
    --button-inactive-text: #5f6368;
    --button-active: #1a73e8;
    --button-active-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #121212;
        --bg-secondary: #1f1f1f;
        --text-primary: #ffffff;
        --text-secondary: #a0a0a0;
        --border-color: #303030;
        --star-empty: #707070;
        --star-filled: #fbbc05;
        --button-inactive: #3c3f43;
        --button-inactive-text: #909396;
        --button-active: #8ab4f8;
        --button-active-text: #202124;
    }

    /* Make logo white in dark mode */
    .futuric-logo {
        filter: invert(1);
    }
}

html, body {
    height: 100%;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 600px; /* Max width for larger screens */
    margin: 0 auto; /* Center on larger screens */
    background-color: var(--bg-secondary);
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    background-color: var(--bg-secondary);
}

.header-title {
    font-size: 1.25rem; /* ~20px */
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex-grow: 1; /* Takes remaining vertical space */
    padding: 16px 20px;
    overflow-y: auto; /* Allows scrolling if content exceeds height */
    margin-top: 40px; /* Space for header */
}

/* User Info Section */
.user-info {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    margin-bottom: 50px; /* Increased margin to create space between username and stars */
}

.profile-pic {
    width: 100px; /* Larger size */
    height: 100px; /* Larger size */
    border-radius: 50%;
    margin-bottom: 16px; /* Space between photo and text */
    object-fit: cover; /* Ensures image covers the area */
}

.user-name {
    font-weight: 700; /* Make name bolder */
    font-size: 1.5rem; /* Increase font size (~24px) */
    color: var(--text-primary);
    text-align: center; /* Center text */
    margin-bottom: 8px; /* Space between name and posting info */
}

.posting-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.info-icon {
    font-size: 14px !important;
    color: var(--text-secondary);
    font-variation-settings: 'FILL' 0, 'wght' 600;
}

/* Rating Section */
.rating-section {
    display: flex;
    justify-content: center; /* Center stars horizontally */
    margin-bottom: 24px;
    padding-left: 0; /* Remove left padding */
}

.stars .star {
    font-size: 36px; /* Larger stars */
    color: var(--star-empty);
    cursor: pointer;
    margin: 0 4px; /* Spacing between stars */
    transition: color 0.2s ease; /* Smooth hover/fill */
    user-select: none; /* Prevent text selection */
    font-variation-settings: 'FILL' 0; /* Ensure outlined by default */
}

.stars .star.filled,
.stars .star:hover {
    color: var(--star-filled);
     font-variation-settings: 'FILL' 1; /* Fill the star */
}


/* Review Input Section */
.review-input {
    margin-bottom: 24px;
    display: none;
}

.review-input.active {
    display: block;
}

.review-input textarea {
    width: 100%;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem; /* ~16px */
    padding: 12px; /* Padding top/bottom */
    resize: none; /* Disable textarea resizing */
    font-family: inherit; /* Use the same font */
    min-height: 100px; /* Minimum height */
}

.review-input textarea::placeholder {
    color: var(--text-secondary);
    font-size: 1rem;
}

.review-input textarea:focus {
    outline: none; /* Remove default focus outline */
    /* border-bottom-color: var(--button-active); Optional: highlight underline on focus */
}


/* Footer */
.app-footer {
    padding: 16px 20px;
    background-color: var(--bg-secondary);
    /* border-top: 1px solid var(--border-color); Optional separator */
}

/* Post Button */
.post-button {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--button-inactive);
    border: none;
    border-radius: 100px; /* Less rounded than add photos */
    color: var(--button-inactive-text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: not-allowed; /* Indicate inactive state */
    text-align: center;
    display: none;
}

.post-button.active {
    background-color: var(--button-active);
    color: var(--button-active-text);
    cursor: pointer;
    display: block;
}

.powered-by {
    text-align: center;
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.powered-by a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.futuric-logo {
    height: 10px;
    width: auto;
    margin-left: 4px;
    margin-right: 0;
    transform: translateY(-1px);
    /* filter: none; /* Default filter (no inversion in light mode) */
}

/* Snackbar styles */
.snackbar {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%);
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
    border: 1px solid var(--border-color);
}

.snackbar.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 100px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 100px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}