/* ========================================
   Coffee Suggestions Page - Styles
   ======================================== */

:root {
    /* Coffee color palette */
    --coffee-dark: #3d2314;
    --coffee-medium: #5c3a21;
    --coffee-light: #8b5a2b;
    --cream: #f5f0e6;
    --cream-light: #faf7f2;
    --accent-gold: #c9a227;
    --text-brown: #4a3428;
    --shadow-coffee: rgba(61, 35, 20, 0.2);

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    background-image: url('assets/paper-texture.png');
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-brown);
    position: relative;
}

/* ========================================
   Floating Coffee Beans & Chocolate Animation
   ======================================== */

.coffee-beans-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.coffee-bean {
    position: absolute;
    width: 40px;
    height: 25px;
    background: linear-gradient(135deg, var(--coffee-dark) 0%, var(--coffee-medium) 50%, var(--coffee-dark) 100%);
    border-radius: 50%;
    box-shadow:
        inset -3px -3px 6px rgba(0, 0, 0, 0.4),
        inset 2px 2px 4px rgba(139, 90, 43, 0.3),
        2px 4px 8px var(--shadow-coffee);
    transform-style: preserve-3d;
}

.coffee-bean::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5), transparent);
    transform: translateY(-50%);
    border-radius: 50%;
}

.coffee-bean::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 30%;
    height: 20%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: rotate(-30deg);
}

/* Chocolate pieces */
.chocolate-piece {
    position: absolute;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #5c3317 0%, #3d1f0d 50%, #2a1508 100%);
    border-radius: 4px;
    box-shadow:
        inset -2px -2px 5px rgba(0, 0, 0, 0.5),
        inset 2px 2px 4px rgba(139, 69, 19, 0.4),
        2px 4px 8px rgba(61, 31, 13, 0.3);
}

.chocolate-piece::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    border-radius: 2px;
}

.chocolate-piece::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 3px;
    right: 3px;
    height: 1px;
    background: rgba(0, 0, 0, 0.25);
}

/* Smooth floating animation - from bottom to top */
@keyframes floatUp {
    0% {
        opacity: 0;
    }

    3% {
        opacity: 0.85;
    }

    97% {
        opacity: 0.85;
    }

    100% {
        transform: translateY(calc(-100vh - 100px)) rotate(360deg);
        opacity: 0;
    }
}

/* ========================================
   Main Container
   ======================================== */

.main-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

/* ========================================
   Decorative Elements
   ======================================== */

.decoration {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
}

.coffee-cup-left {
    bottom: 0;
    left: 0;
    width: 180px;
    animation: gentleFloat 6s ease-in-out infinite;
}

.coffee-sack-right {
    bottom: 0;
    right: 0;
    width: 280px;
    animation: gentleFloat 8s ease-in-out infinite reverse;
}

.chocolate-bar-top {
    top: 20px;
    right: 30px;
    width: 180px;
    animation: gentleFloat 7s ease-in-out infinite;
    opacity: 0.85;
}

.decoration img {
    width: 100%;
    height: auto;
    filter: drop-shadow(4px 4px 12px var(--shadow-coffee));
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* ========================================
   Content Card
   ======================================== */

.content-card {
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(250, 247, 242, 0.95) 100%);
    backdrop-filter: blur(12px);
    border-radius: 30px;
    padding: 50px 60px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 25px 70px var(--shadow-coffee),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset,
        0 -5px 20px rgba(139, 90, 43, 0.08) inset;
    position: relative;
    overflow: hidden;
    animation: cardAppear 1s ease-out;
    border: 2px solid rgba(139, 90, 43, 0.1);
}

/* Card icons at top */
.card-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.icon-coffee {
    animation: bounceIcon 2s ease-in-out infinite;
}

.icon-chocolate {
    animation: bounceIcon 2s ease-in-out infinite 0.3s;
}

@keyframes bounceIcon {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

.content-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center,
            rgba(201, 162, 39, 0.05) 0%,
            transparent 70%);
    animation: shimmer 10s linear infinite;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Typography
   ======================================== */

.title-main {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    color: var(--coffee-dark);
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(61, 35, 20, 0.1);
    animation: titleSlide 0.8s ease-out 0.2s both;
}

.subtitle {
    font-family: var(--font-display);
    font-size: clamp(1rem, 3vw, 1.3rem);
    font-weight: 400;
    font-style: italic;
    color: var(--coffee-light);
    margin-bottom: 8px;
    letter-spacing: 3px;
    animation: titleSlide 0.8s ease-out 0.4s both;
}

.subtitle-small {
    font-family: var(--font-display);
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 400;
    color: var(--coffee-medium);
    margin-bottom: 15px;
    letter-spacing: 2px;
    animation: titleSlide 0.8s ease-out 0.5s both;
}

.title-question {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--coffee-dark);
    margin-bottom: 35px;
    line-height: 1.3;
    animation: titleSlide 0.8s ease-out 0.6s both;
}

@keyframes titleSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Form Styles
   ======================================== */

.suggestion-form {
    text-align: left;
    animation: formAppear 0.8s ease-out 0.8s both;
}

@keyframes formAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--coffee-medium);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(139, 90, 43, 0.2);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-brown);
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(74, 52, 40, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--coffee-light);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(139, 90, 43, 0.15);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, var(--coffee-medium) 0%, var(--coffee-dark) 100%);
    color: var(--cream);
    border: none;
    border-radius: 15px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px var(--shadow-coffee);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--shadow-coffee);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* Button text styling */
.btn-text {
    letter-spacing: 1px;
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 30px;
    animation: successPop 0.5s ease-out;
}

.success-message.show {
    display: block;
}

@keyframes successPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.success-message h3 {
    font-family: var(--font-display);
    color: var(--coffee-dark);
    margin-bottom: 10px;
}

.success-message p {
    color: var(--coffee-medium);
    font-size: 0.95rem;
}

/* ========================================
   Hidden Admin Trigger
   ======================================== */

.admin-trigger {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    cursor: default;
    z-index: 100;
    opacity: 0;
}

/* ========================================
   Admin Panel
   ======================================== */

.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(61, 35, 20, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: overlayFade 0.3s ease;
}

.admin-overlay.show {
    display: flex;
}

@keyframes overlayFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.admin-panel {
    background: var(--cream-light);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    animation: panelSlide 0.4s ease-out;
}

@keyframes panelSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-close {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(139, 90, 43, 0.1);
    color: var(--coffee-dark);
    font-size: 1.8rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-close:hover {
    background: rgba(139, 90, 43, 0.2);
    transform: rotate(90deg);
}

.admin-panel h2 {
    font-family: var(--font-display);
    color: var(--coffee-dark);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.admin-panel h3 {
    font-family: var(--font-display);
    color: var(--coffee-medium);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.admin-login {
    text-align: center;
}

.admin-content {
    display: none;
}

.admin-content.show {
    display: block;
}

.admin-login.hidden {
    display: none;
}

/* Admin Buttons */
.admin-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--coffee-medium) 0%, var(--coffee-dark) 100%);
    color: var(--cream);
    border: none;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-coffee);
}

.admin-btn.secondary {
    background: linear-gradient(135deg, var(--coffee-light) 0%, var(--coffee-medium) 100%);
}

.admin-btn.danger {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

/* Suggestions List */
.suggestions-list {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid var(--coffee-light);
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--shadow-coffee);
}

.suggestion-item:last-child {
    margin-bottom: 0;
}

.suggestion-name {
    font-weight: 700;
    color: var(--coffee-dark);
    font-size: 1.1rem;
}

.suggestion-author {
    font-size: 0.85rem;
    color: var(--coffee-light);
    margin-top: 5px;
}

.suggestion-reason {
    font-size: 0.9rem;
    color: var(--coffee-medium);
    margin-top: 8px;
    font-style: italic;
}

.suggestion-date {
    font-size: 0.75rem;
    color: rgba(74, 52, 40, 0.5);
    margin-top: 8px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.no-suggestions {
    text-align: center;
    color: var(--coffee-light);
    padding: 30px;
    font-style: italic;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .content-card {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .coffee-cup-left {
        width: 120px;
    }

    .coffee-sack-right {
        width: 180px;
    }

    .admin-panel {
        padding: 25px;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 20px 15px;
    }

    .content-card {
        padding: 30px 20px;
    }

    .coffee-cup-left,
    .coffee-sack-right {
        opacity: 0.5;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 15px;
    }
}