/* css/vibez.css - Consolidated stylesheet for Vibez social media site */

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #ff0000, #ffffff, #ff0000);
    background-size: 100% 100%;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background-attachment: fixed;
}

/* Header */
header {
    background-color: #333;
    color: white;
    padding: 1rem;
    text-align: center;
    position: relative;
    z-index: 10;
    font-family: 'Lobster', cursive;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Heart Animation */
.heart {
    width: 20px;
    height: 20px;
    background-color: #ff0000;
    position: relative;
    transform: rotate(-45deg);
    animation: heartBeat 1.5s ease-in-out infinite;
}

.heart::before,
.heart::after {
    content: '';
    width: 20px;
    height: 20px;
    background-color: #ff0000;
    border-radius: 50%;
    position: absolute;
}

.heart::before {
    top: -10px;
    left: 0;
}

.heart::after {
    left: 10px;
    top: 0;
}

@keyframes heartBeat {
    0% { transform: rotate(-45deg) scale(1); }
    20% { transform: rotate(-45deg) scale(1.2); }
    30% { transform: rotate(-45deg) scale(1); }
    40% { transform: rotate(-45deg) scale(1.15); }
    50% { transform: rotate(-45deg) scale(1); }
    100% { transform: rotate(-45deg) scale(1); }
}

/* Vinyl Animation */
.vinyl {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background-color: #000000;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: vinylAnimation 2.5s ease-in-out 4s forwards,
              vinylSpin 1s ease-in-out 4s infinite;
    z-index: 10;
}

.vinyl::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #ff0000;
    border-radius: 50%;
}

.vinyl::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
}

.vinyl .groove {
    position: absolute;
    width: 70px;
    height: 70px;
    border: 1px solid rgba(255, 255, 0.2);
    border-radius: 50%;
}

@keyframes vinylSpin {
    0% { transform: translateX(-50%) rotate(0deg) scale(1); }
    25% { transform: translateX(-50%) rotate(90deg) scale(1.02); }
    50% { transform: translateX(-50%) rotate(180deg) scale(1); }
    75% { transform: translateX(-50%) rotate(270deg) scale(1.02); }
    100% { transform: translateX(-50%) rotate(360deg) scale(1); }
}

@keyframes vinylAnimation {
    0% { bottom: -80px; opacity: 0; }
    20% { bottom: 50%; opacity: 1; }
    80% { bottom: 50%; opacity: 1; }
    100% { bottom: -80px; opacity: 0; }
}

/* Form Containers */
.edit-profile-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

.signup-container,
.login-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: slideIn 0.5s ease-out;
    overflow: visible;
}

.signup-container {
    background: #f9f9f9; /* Override gradient for signup */
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Form Titles */
.edit-profile-container h2 {
    font-family: 'Lobster', cursive;
    color: #fff;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 2em;
}

.section-title,
.login-container h2 {
    font-family: 'Lobster', cursive;
    color: #fff;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 2em;
    text-align: center;
}

.signup-container .section-title {
    color: #333; /* Match inline style */
}

/* Form Styles */
.edit-profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.signup-form,
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.form-group label {
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.1em;
}

.input-group label {
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.1em;
}

.signup-container .input-group label {
    color: #333; /* Match inline style */
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.signup-container .input-group input,
.signup-container .input-group select {
    border: 1px solid #ccc; /* Match inline style */
}

.form-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.9);
    resize: vertical;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.8);
    transform: scale(1.02);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.8);
    transform: scale(1.02);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.8);
    transform: scale(1.02);
}

.form-group input[type="color"] {
    padding: 0.2rem;
    height: 40px;
    width: 60px;
    cursor: pointer;
    border: none;
    background: none;
}

.form-group input[type="color"]::-webkit-color-swatch {
    border: 2px solid #fff;
    border-radius: 4px;
}

.form-group input[type="color"]::-moz-color-swatch {
    border: 2px solid #fff;
    border-radius: 4px;
}

.form-group input[type="file"] {
    padding: 0.5rem 0;
    background: none;
}

.form-group select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
}

.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 180px;
    max-width: 100%;
}
.file-input {
    width: 150px;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 2;
}
.file-upload-text {
    display: block;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1em;
    background: #6495ED; /* Light cornflower blue */
    color: black;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
}

.file-upload-text:hover,
.file-input:focus + .file-upload-text {
    background: #4682B4; /* Slightly darker steel blue on hover */
    box-shadow: 0 0 10px rgba(100, 149, 237, 0.8); /* Adjusted shadow to match blue */
    transform: scale(1.05);
}

.file-upload-input:hover,
.file-upload-input:focus {
    background: #d32f2f;
    transform: scale(1.05);
}
.file-upload-input::-webkit-file-upload-button {
    visibility: hidden;
}
.file-upload-input::before {
    content: 'Choose File';
    display: inline-block;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 1.5;
}
.file-name-display {
    display: block;
    font-size: 0.9em;
    color: #fff;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Button Styles */
.button {
    padding: 0.75rem 2rem;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    line-height: 1.5;
    text-align: center;
}

.signup-container .button {
    background: #007bff; /* From inline style */
}

.signup-container .button:hover {
    background: #0056b3;
}

.login-button {
    background-color: #e57373;
}

.login-button:hover {
    background-color: #d32f2f;
    transform: scale(1.05);
}

.signup-button {
    background-color: #4ecdc4;
}

.signup-button:hover {
    background-color: #3cb0a9;
    transform: scale(1.05);
}

.form-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.form-buttons .button {
    display: inline-block;
    min-width: 180px;
    padding: 0.75rem 1.5rem;
    height: 48px; /* Revert to fixed height for consistency */
    line-height: 1.5; /* Ensure consistent vertical text alignment */
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin: 0;
}

/* Added from edit_profile.css: Default Form Button Styling */
.form-buttons .button:not(.save-button):not(.back-button) {
    background: #ff9f1c;
}

.form-buttons .button:not(.save-button):not(.back-button):hover {
    background: #ffbf69;
}

.save-button {
    background-color: #e57373;
}

.save-button:hover {
    background-color: #d32f2f;
    transform: scale(1.05);
}

.back-button {
    background-color: #6b7280;
}

.back-button:hover {
    background-color: #9ca3af;
    transform: scale(1.05);
}

/* Feedback and Messages */
.feedback {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.feedback.available {
    color: green;
}

.feedback.unavailable {
    color: red;
}

.error-messages {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #721c24;
    background: #f8d7da;
    text-align: center;
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem auto;
    max-width: 600px;
    color: #fff;
    text-align: center;
    background-color: #f87171;
}

.message.success {
    background-color: #34d399;
}

.message.error {
    background-color: #f87171;
}

.message a {
    color: #fff;
    text-decoration: underline;
}

/* Login Prompt */
.login-prompt {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9em;
}

.login-link {
    color: #007bff;
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
}

/* User Info Styles */
.user-info {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin: 2rem auto;
    max-width: 600px;
}

.photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 80px;
}

.photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    object-fit: cover;
}

.username {
    font-weight: bold;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9em;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9em;
}

.user-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.user-actions .button,
.user-actions .button.view-profile-button,
.user-actions .button.logout-button {
    display: inline-block;
    padding: 0.75rem 0;
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    height: 48px;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: "))
    font-size: 1em;
    line-height: 1.5;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
    box-sizing: border-box;
}

.user-actions .button.view-profile-button {
    background: #4ecdc4;
}

.user-actions .button.view-profile-button:hover {
    background: #45b7aa;
}

.user-actions .button.logout-button {
    background: #f87171;
}

.user-actions .button.logout-button:hover {
    background: #dc2626;
}

.online-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.online-status.online::before {
    background-color: #00cc00;
}

.online-status.offline::before {
    background-color: #999;
}

/* Container and Section Styles */
.container {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px;
}

.section {
    flex: 1 1 calc(50% - 10px);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.9);
    animation: breathe 3s ease-in-out infinite;
}

.view-section {
    flex: 1 1 calc(50% - 10px);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: breathe 3s ease-in-out infinite;
}

/* Distinct border colors for each section */
.section:nth-child(1) { border: 3px solid #e57373; }
.section:nth-child(2) { border: 3px solid #81c784; }
.section:nth-child(3) { border: 3px solid #64b5f6; }
.section:nth-child(4) { border: 3px solid #ffb74d; }
.section:nth-child(5) { border: 3px solid #ba68c8; }
.section:nth-child(6) { border: 3px solid #ffd54f; }

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

/* Button Grid */
.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    visibility: visible;
}

/* Button colors matching section borders */
.section:nth-child(1) .button { background-color: #e57373; }
.section:nth-child(2) .button { background-color: #81c784; }
.section:nth-child(3) .button { background-color: #64b5f6; }
.section:nth-child(4) .button { background-color: #ffb74d; }
.section:nth-child(5) .button { background-color: #ba68c8; }
.section:nth-child(6) .button { background-color: #ffd54f; }

.section:nth-child(1) .button:hover { background-color: #d32f2f; }
.section:nth-child(2) .button:hover { background-color: #4caf50; }
.section:nth-child(3) .button:hover { background-color: #1976d2; }
.section:nth-child(4) .button:hover { background-color: #f57c00; }
.section:nth-child(5) .button:hover { background-color: #7b1fa2; }
.section:nth-child(6) .button:hover { background-color: #fbc02d; }

/* Button styles for button-grid */
.button-grid .button {
    display: flex;
    visibility: visible;
    width: 100%;
    min-height: 60px;
    padding: 0.75rem;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.2;
    align-items: center;
    justify-content: center;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    opacity: 0;
    animation: flyIn 0.8s ease-out forwards;
}

/* Overlay for buttons with coming soon image */
.button-overlay {
    position: relative;
    width: 100%;
    min-height: 60px;
}

.coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 60px;
    object-fit: cover;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
    border-radius: 5px;
}

@keyframes flyIn {
    0% { 
        opacity: 0;
        transform: translate(var(--start-x), var(--start-y)) rotateY(360deg);
    }
    100% { 
        opacity: 1;
        transform: translate(0, 0) rotateY(0deg);
    }
}

/* Assign unique starting positions and animation delays */
.button:nth-child(1) { 
    --start-x: -100vw;
    --start-y: -100vh;
    animation-delay: 0.1s;
}
.button:nth-child(2) { 
    --start-x: 100vw;
    --start-y: -100vh;
    animation-delay: 0.2s;
}
.button:nth-child(3) { 
    --start-x: 100vw;
    --start-y: 0;
    animation-delay: 0.3s;
}
.button:nth-child(4) { 
    --start-x: -100vw;
    --start-y: 0;
    animation-delay: 0.4s;
}
.button:nth-child(5) { 
    --start-x: 0;
    --start-y: -100vh;
    animation-delay: 0.5s;
}
.button:nth-child(6) { 
    --start-x: 0;
    --start-y: 100vh;
    animation-delay: 0.6s;
}
.button:nth-child(7) { 
    --start-x: -100vw;
    --start-y: 100vh;
    animation-delay: 0.7s;
}
.button:nth-child(8) { 
    --start-x: 100vw;
    --start-y: 100vh;
    animation-delay: 0.8s;
}
.button:nth-child(9) { 
    --start-x: 0;
    --start-y: 0;
    animation-delay: 0.9s;
}

/* Wobble for third button in first section only */
.section:nth-child(1) .button:nth-child(3) {
    animation: flyIn 0.8s ease-out 0.3s forwards,
              wobble 0.5s ease-in-out 2s 1;
}

@keyframes wobble {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* Preview Styles */
.preview-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.preview-page {
    width: 300px;
    height: 200px;
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.preview-post {
    width: 200px;
    height: 100px;
    background-color: #ffffff;
    opacity: 0.9;
    border: 2px solid #333333;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.9em;
}

/* Form Note */
.form-note {
    font-size: 0.9em;
    color: #fff;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media Queries */
@media (max-width: 768px) {
    header {
        padding: 0.5rem;
        font-size: 1.2em;
        gap: 10px;
    }
    .heart {
        width: 15px;
        height: 15px;
    }
    .heart::before,
    .heart::after {
        width: 15px;
        height: 15px;
    }
    .heart::before {
        top: -7.5px;
    }
    .heart::after {
        left: 7.5px;
    }
    .edit-profile-container {
        margin: 1rem;
        padding: 1.5rem;
        max-width: 100%;
    }
    .signup-container,
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
        max-width: 100%;
    }
    .form-group input,
    .form-group select {
        font-size: 0.9em;
    }
    .input-group input,
    .input-group select {
        font-size: 0.9em;
    }
    .form-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    .button-grid {
        grid-template-columns: 1fr;
        visibility: visible;
    }
    .button-grid .button {
        min-height: 60px;
        font-size: 1rem;
        padding: 0.75rem;
        visibility: visible;
    }
    .preview-page {
        width: 250px;
        height: 150px;
    }
    .preview-post {
        width: 150px;
        height: 80px;
        font-size: 0.8em;
    }
    .user-info {
        flex-direction: column;
        padding: 1rem;
        gap: 15px;
    }
    .photo-container {
        width: 100%;
        max-width: 100px;
    }
    .photo-placeholder {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
    .username {
        max-width: 100%;
        font-size: 1em;
    }
    .user-details {
        align-items: center;
        text-align: center;
        font-size: 0.85em;
    }
    .user-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .user-actions .button,
    .user-actions .button.view-profile-button,
    .user-actions .button.logout-button {
        width: 100%;
        max-width: 130px;
        height: 44px;
        font-size: 0.9em;
    }
    .section-title,
    .login-container h2,
    .edit-profile-container h2 {
        font-size: 1.5em;
    }
    .form-group textarea {
        font-size: 0.9em;
    }
    .form-buttons .button,
    .form-buttons .save-button,
    .form-buttons .back-button {
        width: 100%;
        min-width: 160px;
        padding: 0.75rem 1rem; /* Further reduced padding for smaller screens */
        height: auto;
        font-size: 0.9em;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    .file-upload-text {
        font-size: 0.9em;
    }
}