/* Eredità - Minimalistyczny interfejs */

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #000000;
    --border-color: #e0e0e0;
}

body.theme-dark {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #ffffff;
    --border-color: #333333;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Garamond', 'Baskerville', serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

#app.hidden { display: none; }

/* Login View */
#login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#login-view.hidden { display: none; }

.login-container {
    text-align: center;
    max-width: 500px;
    width: 100%;
    padding: 20px;
}

#login-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 30px;
}

#login-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1.5rem;
    padding: 15px 0;
    width: 100%;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
    margin-bottom: 30px;
}

#login-input:focus {
    border-bottom-color: var(--accent-color);
}

#login-input::placeholder {
    opacity: 0.4;
    font-style: italic;
}

.login-submit-button {
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    font-family: inherit;
    font-size: 1.1rem;
    padding: 15px 40px;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s;
}

.login-submit-button:hover {
    transform: scale(1.05);
}

.login-message {
    margin-top: 20px;
    font-size: 1rem;
    opacity: 0.7;
    min-height: 1.6em;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Volume Control */
.volume-control {
    position: fixed;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.volume-control span {
    font-size: 1.2rem;
}

#volume-slider {
    width: 100px;
    cursor: pointer;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.5rem;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 1000;
}

.theme-toggle:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.view.hidden { display: none; }

/* Play Section */
.play-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
}

.album-art {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.album-art.hidden { display: none; }

.play-section {
    position: relative;
}

.play-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.nav-button:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.play-button {
    background: var(--accent-color);
    color: var(--bg-color);
    font-size: 2.5rem;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    border: none;
}

.play-button:hover {
    transform: scale(1.05);
}

.play-button.playing {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--text-color);
}

/* Recognition Form */
.recognition-form {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

#recognition-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1.5rem;
    padding: 15px 0;
    width: 100%;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

#recognition-input:focus {
    border-bottom-color: var(--accent-color);
}

#recognition-input::placeholder {
    opacity: 0.4;
    font-style: italic;
}

.hint-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.hint-button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s;
}

.hint-button:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 20px;
}

.choice-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-option {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    padding: 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.choice-option:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.choice-option.correct {
    background: var(--accent-color);
    color: var(--bg-color);
}

.close-button {
    margin-top: 20px;
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    font-family: inherit;
    padding: 10px 30px;
    cursor: pointer;
    border-radius: 5px;
}

/* Questions View */
#questions-view {
    align-items: flex-start;
}

.questions-header {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.album-art-wrapper {
    position: relative;
    display: inline-block;
}

.album-art-small {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.weight-counter {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--bg-color);
    font-size: 0.8rem;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.header-text h1 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 5px;
}

.header-text p {
    font-size: 1.2rem;
    opacity: 0.7;
}

.questions-container {
    width: 100%;
}

.question-item {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.question-header {
    cursor: pointer;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-header:hover .question-text {
    opacity: 0.7;
}

.question-text {
    font-size: 1.2rem;
    flex: 1;
    transition: opacity 0.3s;
}

.question-status {
    font-size: 1.5rem;
}

.question-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.question-body.revealed {
    max-height: 500px;
    padding-bottom: 20px;
}

.answer-text {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 20px;
}

.rating-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rating-button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s;
}

.rating-button:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}

.rating-button.selected {
    background: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
    opacity: 1;
}

.rating-button.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Questions Progress */
.questions-progress {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

/* Study Mode */
.study-list {
    width: 100%;
}

.study-item {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.study-item:hover {
    background: var(--bg-color);
    opacity: 0.9;
}

.study-item-header {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.study-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.study-item-info {
    flex: 1;
}

.study-item-info h3 {
    font-size: 1.2rem;
    font-weight: 400;
}

.study-item-info p {
    font-size: 1rem;
    opacity: 0.7;
}

/* Study Play Button */
.study-play-button {
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    font-family: inherit;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: auto;
    flex-shrink: 0;
}

.study-play-button:hover {
    transform: scale(1.1);
}

.study-play-button.playing {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--text-color);
}

/* Study Progress Bar */
.study-progress-container {
    margin-left: 75px;
    margin-top: 10px;
}

.study-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.study-progress {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.1s linear;
    width: 0%;
}

.study-questions {
    display: none;
    margin-left: 75px;
    padding: 10px 0 20px 0;
}

.study-questions.visible {
    display: block;
}

/* Bottom Controls */
.bottom-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.skip-button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s;
}

.skip-button:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.mode-toggle {
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 20px;
}

.footer {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Completion View */
#completion-view {
    text-align: center;
}

#completion-view h1 {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 20px;
}

#completion-message {
    font-size: 1.3rem;
    opacity: 0.7;
    margin-bottom: 40px;
}

.restart-button {
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    font-family: inherit;
    font-size: 1.1rem;
    padding: 15px 40px;
    cursor: pointer;
    border-radius: 25px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.view { animation: fadeIn 0.3s ease-out; }

/* Responsive */
@media (max-width: 768px) {
    #app { padding: 20px 15px 100px 15px; }
    
    .play-section { flex-direction: column; }
    
    .album-art { width: 100px; height: 100px; }
    
    .rating-buttons { flex-direction: column; }
    
    .rating-button { width: 100%; }
    
    .questions-header { flex-direction: column; text-align: center; }
}
