/* ========================
   Base
   ======================== */
body {
    margin: 0;
    padding: 0;
    background-color: #d9a16a;
    color: black;
}

h1 {
    font-family: 'Funnel Display', sans-serif;
    font-size: 2rem;
    padding-left: 0.5rem;
    margin: 0.5rem 0;
}

h2 {
    font-family: 'Funnel Display', sans-serif;
    font-size: 1.5rem;
    padding-left: 1rem;
    margin: 0.5rem 0;
}

p, label {
    padding-left: 1rem;
    font-family: 'Funnel Display', sans-serif;
    font-size: 1rem;
}

/* ========================
   Buttons & Inputs
   ======================== */
button {
    margin: 1rem;
    appearance: none;
    background-color: #111;
    color: white;
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 999px;
    font-family: 'Funnel Display', sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

button:hover {
    background-color: #333;
}

select {
    appearance: none;
    background-color: #111;
    color: white;
    padding: 0.4rem 2rem 0.4rem 0.8rem;
    border: none;
    border-radius: 999px;
    font-family: 'Funnel Display', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
}

input[type="text"] {
    margin-left: 1rem;
    appearance: none;
    background-color: #111;
    color: white;
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 999px;
    font-family: 'Funnel Display', sans-serif;
    font-size: 1rem;
    cursor: text;
    outline: none;
}

input[type="text"]::placeholder {
    color: #aaa;
}

input[type="text"]:focus {
    outline: 2px solid #d9a16a;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 1rem;
}

/* ========================
   Navbar
   ======================== */
#navbar {
    background-color: #111;
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-size: 3rem;
    font-family: 'Fascinate', system-ui;
}

#hamburger {
    margin-left: auto;
    cursor: pointer;
    font-size: 2.5rem;
    color: white;
}

#menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 0;
    background-color: #111;
    padding: 1rem;
    gap: 1rem;
    font-family: 'Funnel Display', sans-serif;
    font-size: 2rem;
    text-align: right;
}

#menu a:link    { color: white; text-decoration: none; }
#menu a:visited { color: #aaa; text-decoration: none; }
#menu a:hover   { color: #d9a16a; }

#menu.open { display: flex; }

.nav-btn {
    background-color: #d9a16a;
    color: #111;
    font-size: 1.5rem;
}

.nav-title {
  color: inherit;
  text-decoration: none;
}

/* ========================
   Record Grid
   ======================== */
#record-grid, #record-rec, #record-recent, #record-pinned {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
}

.card-info {
    margin-top: 0.4rem;
}

.card-info p {
    padding-left: 0;
}

.title  {
	font-weight: bold;
	font-size: 0.9rem;
	overflow-wrap: break-word;
}

.artist { color: #303030; font-size: 0.8rem; }

/* ========================
   Modal / Overlay
   ======================== */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.overlay.open { display: flex; }

.modal {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: 'Funnel Display', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #d9a16a;
}

.close-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    margin: 0;
}

.close-btn:hover { color: white; }

.field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.field label {
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 0;
}

.field input {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    padding: 0.5rem 0.8rem;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    margin: 0;
}

.field input:focus { border-color: #d9a16a; }
.field input::placeholder { color: #555; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.save-btn {
	background-color: #d9a16a;
    color: #111;
	margin-left: 0
}

.cancel-btn {
	margin-right: 0
}

#load-more-btn {
    display: block;
    margin: 1rem auto;
	width: calc(70% - 20px);
}

.btn-group {
    display: flex;
    gap: 0;
    align-items: center;
}

#search-bar {
	margin-right: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    border-radius: 12px;
    background: #eee;
    font-size: 0.85em;
}

.gridjs-td,
.gridjs-th {
    padding: 3px 6px !important;
}


/* ========================
   Media Queries
   ======================== */
@media (max-width: 800px) {
    #record-grid, #record-rec, #record-recent, #record-pinned {
        grid-template-columns: repeat(3, 1fr);
    }
	
	.card {
        min-width: 0;
    }

    input[type="text"] {
        /*margin-left: auto;
        margin-right: auto;*/
        display: block;
    }
	
	.modal {
        max-height: 90vh;
        overflow-y: auto;
		width: 80%;
        margin: 0 auto;
    }

    .field label {
        font-size: 0.65rem;
    }
	
	.field input {
        width: 90%;
		margin-left: 0;
    }

    .modal-footer {
        margin-top: 0.2rem;
    }
	
	.section-header {
        flex-wrap: wrap;
    }
	
	.btn-group {
        width: 100%;
        justify-content: space-between;
    }
	
	.btn-group button {
        margin-left: 1rem;
        margin-right: 0rem;
		width: 50%;
    }
	
	#search-container {
        display: flex;
        width: 100%;
		justify-content: space-between;
    }
	
	#search-bar {
		flex: 1;
		min-width: 0;
		margin-right: 1rem;
	}
}

@media (max-width: 400px) {
    .btn-group {
        flex-wrap: wrap;
		width: 100%;
	}