@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --cream: #ffe599;
  --yellow: #ffd966;
  --cloud: #a2c4c9;
  --sky: #7995af;
  --rain: #577693;
  --iron: #464c52;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--iron);
}

/* Header*/

header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

header .bar {
  background-color: var(--cream);
  color: var(--rain);
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--rain);
  padding: 15px 5%;
  gap: 16px;
}

header .logo img {
  height: 40px;
  display: block;
}

header .navigation ul {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}

header .navigation ul li a {
  text-decoration: none;
  color: var(--yellow);
  font-weight: 500;
  transition: color 0.2s;
}

header .navigation ul li a.active {
  border-bottom: 2px solid var(--yellow);
  padding-bottom: 4px;
}

header .navigation ul li a:hover {
  color: var(--cream);
}

header .icons {
  display: flex;
  gap: 16px;
  align-items: center;
}

header .icons a {
  text-decoration: none;
  color: var(--cloud);
  display: flex;
  align-items: center;
}

header .icons img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity 0.2s;
}

header .icons a:hover img {
  opacity: 1;
}

.main-content {
  margin-top: 90px;
}



.search-form {
    display: flex;
    align-items: center;
}

.search-wrapper {
    position: relative;
    display: flex;
    background: #f1f1f1;
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid #ddd;
}

.search-wrapper input {
    border: none;
    background: none;
    outline: none;
    padding: 5px;
    font-size: 14px;
    width: 150px; /* Adjust as needed */
    transition: width 0.3s ease;
}

.search-wrapper input:focus {
    width: 200px;
}

.search-wrapper button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.search-wrapper img {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}





/*Landing Page*/
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #FDE89D, #A8C5C1, #5A7D9A);
  font-family: 'Poppins', sans-serif;
  position: relative;
}

body::before {
  position: absolute;
  font-size: 2rem;
  color: rgba(0,0,0,0.05);
  word-spacing: 100px;
  line-height: 200px;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-15deg);
  z-index: -1;
  pointer-events: none;
}

.landing-container {
  background-color: var(--cream);
  padding: 20px;
  position: relative;
  width: 90%;
  max-width: 800px;
  border: 2px solid var(--iron);
  border-radius: 15px;
  box-shadow: 12px 12px 0px var(--rain);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-sizing: border-box;
}

.landing-container:hover {
  transform: scale(1.02) rotate(-0.5deg);
}

.inner-frame {
  border: 1px solid rgba(51, 51, 51, 0.2);
  border-radius: 10px;
  padding: 80px 20px;
  text-align: center;
  position: relative;
}

.inner-frame::before, .inner-frame::after {
  content: '★';
  position: absolute;
  color: var(--rain);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.landing-container:hover .inner-frame::before { transform: rotate(90deg); }
.landing-container:hover .inner-frame::after { transform: rotate(-90deg); }

.inner-frame::before { top: 15px; left: 15px; }
.inner-frame::after { bottom: 15px; right: 15px; }

.main-title {
  color: var(--rain);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 4px;
  line-height: 0.9;
  text-shadow: 2px 2px 0px rgba(255,255,255,0.5);
}

.sub-title {
  display: block;
  font-family: 'Dancing Script', cursive;
  text-transform: none;
  color: var(--yellow);
  font-size: 0.7em;
  margin-top: 5px;
  letter-spacing: 1px;
}

.button-group {
  margin-top: 40px;
}

.btn {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.primary-btn {
  background-color: var(--cloud);
  color: var(--iron);
  border: 2px solid var(--iron);
  box-shadow: 5px 5px 0px var(--iron);
}

.primary-btn:hover {
  background-color: #fff;
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0px var(--iron);
}

.primary-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0px 0px 0px var(--iron);
}




/*Login and Registration*/
.auth-portal-viewport {
    background-color: var(--cloud);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.auth-portal-container {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    width: 850px;
    max-width: 95%;
    min-height: 550px;
}

.form-panel {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 50px;
    background-color: #fff; 
}

.sign-in-panel {
    left: 0; 
    z-index: 2;
    opacity: 1;
}

.sign-up-panel {
    left: 0;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.auth-portal-container.sign-up-active .sign-in-panel {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.auth-portal-container.sign-up-active .sign-up-panel {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    pointer-events: all;
    animation: showLayer 0.6s;
}

@keyframes showLayer {
    0%, 49.99% { opacity: 0; z-index: 1; }
    50%, 100% { opacity: 1; z-index: 5; }
}

form {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    text-align: center;
}

.brand { 
    color: var(--rain); 
    font-size: 1.1rem; 
    margin-bottom: 5px; 
}

h1 {
    margin: 0 0 15px;
    font-size: 1.6rem;
    color: #222; 
}

input {
    background-color: #f0f2f5;
    border: none;
    padding: 12px 20px;
    margin: 8px 0;
    width: 100%;
    border-radius: 25px;
    box-shadow: inset 2px 2px 5px #babecc, inset -3px -3px 7px #ffffff;
    outline: none;
}

.file-box {
    width: 100%;
    text-align: left;
    font-size: 11px;
    color: #464c52;
    margin: 5px 0 10px;
}

.forgot-pass {
    color: #464c52;
    font-size: 12px;
    text-decoration: none;
    margin: 5px 0 15px;
    align-self: flex-end;
}

.main-auth-btn {
    border-radius: 25px;
    border: none;
    background: #f0f2f5;
    color: #1a1a4b;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 55px;
    cursor: pointer;
    box-shadow: 3px 3px 6px #babecc, -3px -3px 6px #ffffff;
    transition: transform 0.1s ease;
    text-transform: uppercase;
    margin-top: 10px;
}

.main-auth-btn:active {
    transform: scale(0.95);
    box-shadow: inset 2px 2px 5px #babecc, inset -1px -1px 2px #ffffff;
}

.overlay-mask {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.auth-portal-container.sign-up-active .overlay-mask {
    transform: translateX(-100%);
}

.overlay-track {
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.auth-portal-container.sign-up-active .overlay-track {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.overlay-left-content { 
    transform: translateX(-20%); 
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('/BookSwipe/public/assets/img/books/signup.jpg');
}

.overlay-right-content { 
    right: 0; 
    transform: translateX(0); 
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
                url('/BookSwipe/public/assets/img/books/login.jpg');
}

.auth-portal-container.sign-up-active .overlay-left-content { 
    transform: translateX(0); 
}

.auth-portal-container.sign-up-active .overlay-right-content { 
    transform: translateX(20%); 
}

/* Text in Overlays */
.overlay-panel h1 { 
    color: #ffffff; 
    margin-bottom: 20px; 
}

.overlay-panel p { 
    font-size: 13px; 
    line-height: 1.6; 
    margin: 15px 0 25px; 
}

/* Ghost Button Styling */
.ghost-auth-btn {
    background-color: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    border-radius: 25px;
    padding: 10px 40px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ghost-auth-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}





/*settings*/
.settings-wrapper {
    max-width: 1000px;
    width: 100%;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--iron);
    margin-bottom: 5px;
}

.subtitle {
    color: var(--sky);
    margin-bottom: 30px;
}

.settings-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    background: var(--cloud);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    min-height: 600px;
}

/* ── Sidebar nav ── */
.settings-nav {
    background-color: var(--yellow);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0,0,0,0.05);
}

.tab {
    padding: 15px 25px;
    cursor: pointer;
    font-weight: 500;
    color: var(--rain);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    border-top: none;
    border-right: none;
    border-bottom: none;
    text-decoration: none;
    background: none;
    text-align: left;
    font-size: 1rem;
    width: 100%;
}

.tab:hover {
    background: rgba(255, 217, 102, 0.2);
    color: var(--iron);
}

.settings-nav .tab.active {
    background: var(--white);
    color: var(--iron);
    border-left: 4px solid var(--sky);
    font-weight: 600;
}

.logout-link {
    margin-top: auto;
    color: var(--rain);
}

/* ── Content area ── */
.settings-content {
    padding: 40px;
    background: var(--white);
    overflow-y: auto;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tab-content h2 {
    margin-bottom: 10px;
    color: var(--iron);
}

.tab-content p {
    font-size: 0.9rem;
    color: var(--sky);
    margin-bottom: 25px;
}

/* ── Alerts ── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success {
    background: #e6f9f0;
    color: #1a7f4b;
    border: 1px solid #a3e4c1;
}

.alert-error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}

/* ── Forms ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid div {
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--iron);
}

input,
select,
textarea {
    padding: 12px;
    border: 1px solid var(--cloud);
    border-radius: 8px;
    outline: none;
    font-size: 0.9rem;
    transition: border 0.3s;
    font-family: inherit;
}

input:focus,
textarea:focus {
    border-color: var(--sky);
}

textarea {
    resize: vertical;
}

/* ── Profile picture section ── */
.profile-picture-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.profile-picture {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
}

.profile-picture-section input[type="file"] {
    display: none;
}

.upload-label {
    cursor: pointer;
    background: var(--sky);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.3s;
    margin-bottom: 0;
}

.upload-label:hover {
    background: var(--rain);
}

/* ── Save button ── */
.save-btn {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 12px 30px;
    background-color: var(--sky);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: fit-content;
}

.save-btn:hover {
    background-color: var(--rain);
}

/* ── Scroll fix ── */
html,
body {
    height: auto;
    overflow-y: auto;
}

.main-content {
    overflow: visible;
    height: auto;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .settings-container {
        grid-template-columns: 1fr;
    }

    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
    }

    .tab {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
        width: auto;
    }

    .settings-nav .tab.active {
        border-left: none;
        border-bottom: 3px solid var(--sky);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}