/* --- General Styles --- */
:root {
    --primary-color: #2E7D32; /* Green */
    --secondary-color: #4CAF50;
    --background-color: #f4f7f6;
    --card-background: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    padding: 0 15px;
}

/* --- Utility Class --- */
.hidden {
    display: none !important;
}

/* --- Header --- */
header {
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

header img {
    height: 40px;
    margin-right: 15px;
}

header h1 {
    font-size: 1.5em;
    font-weight: 600;
}

/* --- Main Content & Cards --- */
.card {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}
.card p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}


/* --- Form Elements --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.grid-container-image {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.grid-container-tech {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

select, textarea, input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fdfdfd;
    transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus, textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

textarea {
    resize: vertical;
}

/* --- Buttons --- */
.action-button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.action-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* --- Result & Navigation --- */
.result-card #resultPrompt {
    background-color: #e9ecef;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.navigation-card {
    text-align: center;
    background: none;
    border: none;
    box-shadow: none;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-button {
    padding: 12px 25px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(45deg, #4CAF50, #81C784, #2E7D32, #4CAF50);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.nav-button:hover::before {
    left: 100%;
}

.nav-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* --- CSS CHO POPUP "LIKE GATE" --- */
.modal-overlay {
    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;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 450px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.8em;
}

.modal-content p {
    margin: 15px 0 25px;
    color: #555;
    line-height: 1.7;
}

.like-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    width: 100%;
    background-color: #1877F2; /* Facebook Blue */
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-bottom: 15px;
}

.like-button svg {
    margin-right: 10px;
}

.like-button:hover {
    background-color: #166FE5;
    transform: translateY(-2px);
}

.close-modal-button {
    padding: 10px 20px;
    background-color: transparent;
    color: #666;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: underline;
    transition: color 0.3s;
}

.close-modal-button:hover {
    color: var(--primary-color);
}


/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    background-color: #e0e0e0;
    color: #555;
    font-size: 0.9em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.2em;
    }
}