/* General Styling */
body {
    /* Bright, light background with a subtle gradient */
    background: linear-gradient(135deg, #f0f8ff, #ffffff);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.amt-container-v4 {
    font-family: 'Inter', sans-serif;
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    /* Light glassmorphism effect */
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    color: #2c3e50; /* Dark text for contrast on light background */
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}
.amt-container-v4:hover {
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.15);
}

.amt-container-v4 h2 {
    font-size: 2rem;
    color: #0497f9; /* Use the theme color for main headings */
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.amt-container-v4 h3 {
    font-size: 1.5rem;
    color: #34495e;
    margin-bottom: 1rem;
    font-weight: 600;
}
.amt-container-v4 p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
}

/* Custom Message Box */
.amt-message-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.amt-message-content {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.amt-message-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #333;
}
#amt-message-close-btn {
    padding: 10px 20px;
    font-size: 1rem;
}

/* Input and Buttons - Adjusted for brighter theme */
.amt-input-field {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}
.amt-input-field:focus {
    border-color: #0497f9;
    box-shadow: 0 0 0 3px rgba(4, 151, 249, 0.2);
    outline: none;
}
.amt-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
    margin: 0;
    position: relative;
    overflow: hidden;
    /* Neumorphism-like effect with light colors */
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow: 5px 5px 10px rgba(174, 174, 192, 0.4),
                -5px -5px 10px #ffffff;
    color: #34495e;
}
.amt-btn:hover { 
    transform: translateY(-2px);
    box-shadow: 8px 8px 15px rgba(174, 174, 192, 0.5),
                -8px -8px 15px #ffffff;
}
.amt-btn:active {
    transform: translateY(0);
    box-shadow: inset 3px 3px 7px rgba(174, 174, 192, 0.5),
                inset -3px -3px 7px #ffffff;
}

.amt-btn-primary { 
    background: linear-gradient(145deg, #0497f9, #0073aa);
    color: white;
    box-shadow: 5px 5px 10px rgba(4, 151, 249, 0.4),
                -5px -5px 10px #70c4ff;
}
.amt-btn-primary:hover {
    background: linear-gradient(145deg, #0073aa, #0497f9);
    box-shadow: 8px 8px 15px rgba(4, 151, 249, 0.5),
                -8px -8px 15px #70c4ff;
}

.amt-btn-secondary { 
    background: linear-gradient(145deg, #ecf0f1, #dce1e3);
    color: #34495e;
    box-shadow: 5px 5px 10px rgba(174, 174, 192, 0.2),
                -5px -5px 10px #ffffff;
}
.amt-btn-secondary:hover {
    background: linear-gradient(145deg, #dce1e3, #ecf0f1);
}

.amt-btn-danger { 
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 5px 5px 10px rgba(231, 76, 60, 0.4),
                -5px -5px 10px #ff988d;
}
.amt-btn-danger:hover {
    background: linear-gradient(145deg, #c0392b, #e74c3c);
}

.amt-button-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.amt-close-game-link {
    display: block;
    margin-top: 2rem;
    padding-top: 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
    text-decoration: none;
    border-top: 1px solid #ecf0f1;
    transition: color 0.2s ease;
}
.amt-close-game-link:hover { color: #0497f9; }

/* Views - ensure only one is visible at a time */
.amt-view {
    display: none;
    text-align: center;
}

/* Learn Slides */
.amt-learn-slide { padding: 1rem; }
.amt-learn-nav { margin-top: 2rem; }

/* User ID Display */
.amt-user-id-display {
    text-align: right;
    font-size: 0.8rem;
    color: #95a5a6;
    margin-bottom: 1rem;
}

/* My Goals List View */
#amt-my-goals-list-view {
    text-align: left;
}
#amt-goals-list {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}
.amt-no-goals-message {
    text-align: center;
    color: #888;
    font-style: italic;
    margin-top: 2rem;
}
.amt-list-actions {
    margin-top: 2rem;
}

/* Individual Goal Card in List - Glassmorphism effect */
.amt-goal-card {
    background: rgba(255, 255, 255, 0.4); /* Lighter transparency for cards */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.amt-goal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.amt-goal-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #34495e;
    font-size: 1.3rem;
    width: 100%;
}
.amt-goal-progress-summary {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.amt-goal-status {
    font-size: 0.95rem;
    color: #7f8c8d;
    flex-grow: 1;
}
.amt-goal-achieved {
    color: #27ae60;
    font-weight: 600;
}
.amt-entry-made-today {
    color: #2980b9;
    font-weight: 500;
}
.amt-goal-progress-summary .amt-progress-bar-container {
    height: 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.1);
}
.amt-goal-progress-summary .amt-progress-bar {
    height: 100%;
    border-radius: 5px;
    background-color: #0497f9;
}
.amt-goal-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    margin-top: 1rem;
}
.amt-goal-actions .amt-btn {
    flex-grow: 1;
    font-size: 0.9rem;
    padding: 8px 16px;
}
.amt-goal-actions .amt-record-step-btn {
    flex-grow: 2;
}

/* Create New Goal View */
#amt-create-goal-view {
    text-align: center;
}
#amt-new-goal-name-input {
    margin-top: 1rem;
}

/* Individual Goal Journey View Styles */
#amt-goal-journey-view { text-align: center; }
#amt-journey-goal-name {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #0497f9;
    font-size: 2.2rem;
    font-weight: 700;
}

/* Steps Display - Adjusted for brighter theme */
.amt-goal-status-area {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
.amt-steps-display {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}
#amt-steps-remaining-value {
    font-size: 2.5rem;
    color: #e74c3c;
    font-weight: 700;
}
.amt-journey-progress-container {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    height: 20px;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.1);
}
#amt-journey-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 8px;
    background-color: #0497f9;
    transition: width 0.5s ease-in-out;
    z-index: 1;
}
.amt-goal-message {
    padding: 0.8rem;
    border-radius: 12px;
    background-color: rgba(4, 151, 249, 0.1); /* Light transparent blue */
    color: #155724; /* Dark green text for contrast */
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid rgba(4, 151, 249, 0.2);
}

/* Entry Area */
.amt-entry-area {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.amt-entry-card {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.4);
    max-width: 250px;
    width: 100%;
}
.amt-entry-card h3 { margin-top: 0; }
.amt-entry-description { flex-grow: 1; margin-bottom: 1.5rem; font-size: 0.95rem; line-height: 1.5; color: #666;}
.amt-entry-btn { width: 100%; }
.amt-btn-in-favor { 
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 5px 5px 10px rgba(46, 204, 113, 0.4),
                -5px -5px 10px #70e6ad;
}
.amt-btn-in-favor:hover { background: linear-gradient(145deg, #27ae60, #2ecc71); }

.amt-journey-actions {
    margin-top: 2rem;
    justify-content: space-between;
}
.amt-journey-actions .amt-btn {
    flex-grow: 0;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .amt-container-v4 {
        padding: 1.5rem 1rem;
        border: none;
        box-shadow: none;
    }
    .amt-entry-area {
        flex-direction: column;
        gap: 1rem;
    }
    .amt-entry-card {
        padding: 1rem;
        max-width: 100%;
    }
    .amt-entry-description {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }
    .amt-entry-card h3 {
        margin-bottom: 0.5rem;
        font-size: 1.2rem;
    }
    .amt-button-wrapper .amt-btn {
        flex-grow: 1;
        flex-basis: auto;
    }
    .amt-goal-status-area {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    .amt-steps-display {
        font-size: 1.5rem;
    }
    #amt-steps-remaining-value {
        font-size: 2rem;
    }
    .amt-goal-message {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    .amt-journey-actions {
        flex-direction: column;
        gap: 10px;
    }
    .amt-journey-actions .amt-btn {
        width: 100%;
    }

    /* Adjustments for My Goals List on mobile */
    .amt-goal-card {
        padding: 0.8rem 1rem;
    }
    .amt-goal-card h3 {
        font-size: 1.1rem;
    }
    .amt-goal-status {
        font-size: 0.85rem;
    }
    .amt-goal-actions {
        flex-direction: column;
        gap: 10px;
    }
    .amt-goal-actions .amt-btn {
        width: 100%;
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    .amt-list-actions .amt-btn {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}
