/* Global Styles */
body {
    background: #111;
    color: #fff;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    text-align: center;
}

/* Auth Form Styles */
.container {
    max-width: 600px;
    width: 100%;
    margin: 60px auto;
    background: #232526;
    padding: 32px 28px 24px 28px;
    border-radius: 14px;
    box-shadow: 0 4px 24px #0005;
    text-align: center;
}
.container h2 {
    margin-bottom: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}
form input[type="text"], form input[type="email"], form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    margin: 12px 0;
    border: none;
    border-radius: 8px;
    background: #18191a;
    color: #fff;
    font-size: 1.08rem;
    font-weight: bold;
    box-shadow: 0 1px 4px #0003;
    outline: none;
    transition: background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
form input[type="text"]:focus, form input[type="password"]:focus {
    background: #222;
    box-shadow: 0 2px 8px #0005;
}
.form-btn {
    width: 100%;
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 0;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 18px;
    box-shadow: 0 2px 8px #0004;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}
.form-btn i {
    font-size: 1.2rem;
}
.container p {
    margin-top: 18px;
    color: #ccc;
}
.container a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}
.container a:hover {
    text-decoration: underline;
}
form {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}
input[type="text"],
input[type="email"],
input[type="password"] {
    background: #333;
    color: #fff;
    border: none;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 5px;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: 2px solid #fff;
}
button {
    background: #fff;
    color: #000;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
}
button:hover {
    background: #444;
    color: #fff;
}
p {
    text-align: center;
    color: #aaa;
}

/* Header Styles */
.navbar {
    background: linear-gradient(90deg, #232526 0%, #414345 100%);
    box-shadow: 0 4px 24px #0005, 0 1.5px 0 #fff1 inset;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    min-height: 70px;
}
.logo-img {
    width: 75px;
    height: 75px;
    margin-right: 100px;
    padding: 4px;
    flex-shrink: 0;
}
.nav-icons {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-right: 35px;
}
.nav-icon-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.6rem;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-icon-link:hover, .nav-icon-link.active {
    background: #fff2;
    color: #fff;
}
.search-bar {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 20px;
}
.search-bar .search-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    margin-right: 0;
    z-index: 2;
}
.search-bar .search-input {
    width: 500px;
    max-width: 90vw;
    min-width: 120px;
    padding: 8px 16px;
    border-radius: 18px;
    background: #222;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 1px 4px #0003;
    outline: none;
    transition: box-shadow 0.2s, width 0.3s, opacity 0.3s;
    max-width: 90vw;
    min-width: 120px;
    opacity: 1;
    visibility: visible;
}
.search-bar input:focus {
    box-shadow: 0 2px 8px #0005;
    background: #333;
}

/* Index Styles */
.index-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin-top: 120px;
    box-sizing: border-box;
}

/* Confession Styles */
.main-content {
    margin-top: 90px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.confession-container {
    background: #222;
    padding: 40px 30px;
    margin: 100px auto;
    border-radius: 16px;
    box-shadow: 0 0 16px #000a;
    width: 370px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mic-btn {
    background: #fff;
    color: #111;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px #0007;
    margin-bottom: 18px;
    transition: background 0.2s, color 0.2s;
}
.mic-btn.recording {
    background: #e74c3c;
    color: #fff;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 #e74c3c55; }
    70% { box-shadow: 0 0 0 15px #e74c3c11; }
    100% { box-shadow: 0 0 0 0 #e74c3c00; }
}
.timer {
    font-size: 1.3rem;
    margin-bottom: 18px;
    letter-spacing: 2px;
}
.voice-card {
    background: #333;
    border-radius: 12px;
    padding: 18px 16px;
    margin-top: 25px;
    width: 100%;
    box-shadow: 0 2px 8px #0005;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
.voice-title-input {
    width: 95%;
    padding: 7px 10px;
    border-radius: 5px;
    border: none;
    background: #222;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 8px;
}
.audio-controls {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
}
.play-btn, .volume-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}
.play-btn:hover, .volume-btn:hover {
    color: #aaa;
}
.seek-bar {
    flex: 1;
    height: 5px;
    background: #444;
    border-radius: 3px;
    margin: 0 10px;
    position: relative;
    cursor: pointer;
}
.seek-bar-progress {
    background: #fff;
    height: 100%;
    border-radius: 3px;
    width: 0%;
    position: absolute;
    top: 0;
    left: 0;
}
.volume-slider {
    width: 70px;
    accent-color: #fff;
}
.hidden {
    display: none;
}
.upload-btn {
    margin-top: 10px;
    background: #fff;
    color: #111;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    align-self: center;
    gap: 8px;
    transition: background 0.2s, color 0.2s;
}
.upload-btn:disabled {
    background: #888;
    color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}
.upload-btn i {
    font-size: 1.2rem;
}

/* Profile Styles */
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 90px;
    background: #232526;
    padding: 36px 32px 28px 32px;
    border-radius: 14px;
    box-shadow: 0 4px 24px #0005;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
.profile-icon {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.profile-icon img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}
.user-id {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.confession-count {
    font-size: 1.1rem;
    color: #aaa;
    background: #333;
    padding: 10px 22px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}
.confession-count i {
    color: #fff;
}
.profile-divider {
    border: none;
    border-top: 2px solid #444;
    margin: 32px auto 24px auto;
    width: 100%;
    max-width: 420px;
    opacity: 0.7;
}
.audio-card {
    background: #333;
    border-radius: 12px;
    padding: 24px 16px;
    margin: 30px auto;
    width: 100%;
    box-shadow: 0 2px 8px #0005;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 420px;
}
.user-id-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.confession-title {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    text-align: left;
    font-weight: bold;
}
.audio-user-id {
    flex: 0 0 auto;
    margin-left: 12px;
    text-align: right;
    min-width: 80px;
    position: relative;
    right: 0;
    color: #aaa;
    font-weight: bold;
}
.audio-controls {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    position: relative;
}
.play-btn,.volume-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    margin-left: auto;
}
.seek-range {
    width: 220px;
    max-width: 300px;
    accent-color: #fff;
    flex: 1;
    height: 10px;
    margin: 0 14px;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
}
.volume-slider {
    width: 70px;
}
.audio-actions {
    display: flex;
    flex-direction: row;
    gap: 40px;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
}
.audio-action-icon {
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.audio-action-icon:hover {
    background: #fff2;
}
.audio-action-icon .count {
    font-size: 1.05rem;
    color: #fff;
    margin-left: 4px;
    min-width: 18px;
    text-align: left;
}
.audio-action-icon:hover {
    background: #fff2;    
}
.comment-section {
    background:#222;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    margin: 15px 0;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 96%; 
    max-width: 520px; 
    min-width: 350px; 
}
.comments-list {
    max-height: 90px;
    overflow-y: auto;
    margin-bottom: 8px;
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #888 #222; /* For Firefox */
}
.comments-list::-webkit-scrollbar {
    width: 8px;
    background: #222;
    border-radius: 8px;
}
.comments-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 8px;
    border: 2px solid #222;
}
.comments-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}
.comments-list div {
    padding: 7px 12px;
    margin-bottom: 6px;
    color: #fff;
    font-size: 1em;
}
.comment-form {
    padding: 8px 12px;
    margin-bottom: 10px;
}
.comment-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    background: #333;
    padding: 5px 10px;
}
.comment-form input[type="text"] {
    flex: 1;
    border: none;
    background: #fff;
    background: transparent;
    padding: 8px;
    font-size: 1em;
    outline: none;
}
.send-comment-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
}
.send-comment-btn:hover {
    color: #aaa;
}
.report-section {
    background: #222;
    border: 2px solid #fff;
    border-radius: 18px;
    margin: 15px 0;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 96%;
    max-width: 520px;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.report-form {
    background: transparent;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: none;
}
.report-form select {
    flex: 1;
    border: none;
    background: #222;
    padding: 8px;
    font-size: 1em;
    outline: none;
    color: #fff;
    border-radius: 5px;
    margin-right: 10px;
    box-shadow: 0 1px 4px #0003;
}
.report-form select:focus {
    outline: 2px solid #fff;
    background: #333;
}

/* Settings Styles */
.settings-container {
    max-width: 500px;
    background: #232526;
    padding: 36px 32px 28px 32px;
    border-radius: 14px;
    box-shadow: 0 4px 24px #0005;
    text-align: center;
    margin-top: 90px ;
}
.settings-container h1 {
    font-size: 2.1rem;
    font-weight: bold;
    letter-spacing: 1px;
}
.settings-list {
    list-style: none;
    padding: 0;
    margin: 32px 0 0 0;
}
.settings-list form {
    margin: 18px 0;
}
.settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #18191a;
    color: #fff;
    text-decoration: none;
    font-size: 1.08rem;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 1px 4px #0003;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.settings-btn:hover {
    background: #fff;
    color: #232526;
    box-shadow: 0 2px 8px #0005;
}
.settings-btn i {
    font-size: 1.2rem;
}
.logout-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: auto;
    margin-right: 0;
    box-shadow: 0 2px 8px #0004;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    align-self: center;
    max-width: 120px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.logout-btn i {
    margin-right: 8px;
}
.settings-footer {
    margin-top: 40px;
    text-align: center;
    color: #888;
    font-size: 0.95em;
}
.footer-social {
    display: inline-block;
    margin-top: 8px;
}
.settings-btn.instagram-btn {
    background: none;
    color: #E1306C;
    font-size: 1.3em;
    box-shadow: none;
    padding: 0 10px;
    border: none;
    cursor: pointer;
}
.settings-btn.facebook-btn {
    background: none;
    color: #1877F3;
    font-size: 1.3em;
    box-shadow: none;
    padding: 0 10px;
    border: none;
    cursor: pointer;
}
.settings-btn.x-btn {
    background: none;
    color: #000;
    font-size: 1.3em;
    box-shadow: none;
    padding: 0 10px;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}
.settings-btn.x-btn:hover {
    color: #1da1f2;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .search-bar .search-input {
        width: 100%;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 1.25rem;
    }
    .navbar {
        flex-direction: column;
        align-items: center;
    }
    .logo-img {
        margin: 5px;
        display: block;
    }
    .nav-icons {
        margin: 0;
        gap: 5px;
    }
    .search-bar .search-input {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .confession-container, .voice-card {
        width: 98vw;
        max-width: 99vw;
        min-width: 0;
        padding: 10px 2vw;
        border-radius: 12px;
        font-size: 1.05rem;
        box-sizing: border-box;
    }
    .audio-card {
        width: 98vw;
        max-width: 99vw;
        min-width: 0;
        border-radius: 12px;
        font-size: 1.05rem;
        box-sizing: border-box;      
    }
    .settings-container {
        width: 98vw;
        max-width: 99vw;
        min-width: 0;
        padding: 2vw;
        border-radius: 12px;
        font-size: 1.05rem;
        box-sizing: border-box;
    }
    .index-container,
    .confession-container {
        margin-top: 200px;
    }
    .profile-container,
    .settings-container {
        margin-top: 150px;
    }
    .container {
        padding: 10px 2vw;
        border-radius: 12px;
        font-size: 1.05rem;
        box-sizing: border-box;
    }
}

@media (max-width: 400px) {
    .audio-controls {
        gap: 0px;
    }
    .audio-actions {
        gap: 14px;
    }
    .volume-slider {
        width: 50px;
    }
}
