/* style.css */

/* Define color variables for easy theme changes */
:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #333;
    --primary-color: #007bff;
    --light-grey: #e9ecef;
    --border-color: #dee2e6;
    
    /* Disc Colors */
    --color-blue: #a0c4ff;
    --color-orange: #ffd6a5;
    --color-purple: #c3aed6;
    --color-pink: #ffaddd;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.app-container {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--card-bg);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

/* --- Login Form Styles --- */
.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.login-box {
    width: 100%;
}

.login-box h2 {
    margin-bottom: 0.5rem;
}

.login-box p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.login-box input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.login-box button {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-box button:hover {
    background-color: #0056b3;
}

/* --- Filter Styles --- */
.filter-controls {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    border-bottom: 1px solid var(--light-grey);
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* --- Swiper and Disc Card Styles --- */
.swiper-container {
    width: 100%;
    padding: 2rem 0;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.disc-card {
    width: 90%;
    max-width: 320px;
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    border-top: 5px solid;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Set border color based on disc color class */
.disc-card.blue { border-color: var(--color-blue); }
.disc-card.orange { border-color: var(--color-orange); }
.disc-card.purple { border-color: var(--color-purple); }
.disc-card.pink { border-color: var(--color-pink); }

.disc-image {
    width: 242px;
    height: 242px;
    border-radius: 50%; /* This makes the div circular */
    margin: 0 auto 1rem;
    background-repeat: no-repeat;
    /* The specific background image and position are set inline in the HTML */
    border: 4px solid var(--light-grey);
}

.disc-name {
    margin: 0.5rem 0;
    font-size: 1.25rem;
}

.quantity-control {
    margin-top: 1rem;
}

.quantity-control p {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.quantity-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--light-grey);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.quantity-input {
    width: 60px;
    text-align: center;
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 0 0.5rem;
    -moz-appearance: textfield; /* Hides arrows in Firefox */
}

/* Hides arrows in Chrome, Safari, etc. */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Style the swiper navigation arrows */
.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color);
}

/* --- Header Logout Button Styles --- */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

header h1 {
    margin: 0;
}

.logout-btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.logout-btn:hover {
    background-color: #f1f1f1;
}

/* --- Header Swap Opt-in Styles --- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.swap-opt-in {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: white;
    font-size: 0.9rem;
}

.swap-opt-in input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* --- Swap Button Styles --- */
.swap-container {
    margin-top: 1rem;
    min-height: 30px; /* reserve space */
}

.swap-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.swap-btn:hover {
    background-color: #218838;
}

.swap-btn.sent {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* --- Footer & Share Button Styles --- */
.app-footer {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid var(--light-grey);
    background-color: #f8f9fa;
}

#shareCollectionBtn, #copyLinkBtn {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#shareCollectionBtn:hover {
    background-color: #0056b3;
}

.share-link-container {
    margin-top: 1rem;
}

.share-link-container p {
    margin: 0 0 0.5rem;
    color: #333;
}

.share-link-container input {
    width: 70%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px 0 0 6px;
    background-color: #fff;
}

#copyLinkBtn {
    border-radius: 0 6px 6px 0;
    border-left: none;
    background-color: #6c757d;
}
#copyLinkBtn:hover {
    background-color: #5a6268;
}