:root {
    --primary-color: #4f46e5;      /* Indigo */
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --positive: #22c55e;           /* Green */
    --negative: #ef4444;           /* Red */
    --neutral: #f59e0b;            /* Amber */
    --bg-color: #f8fafc;           /* Light gray */
    --text-primary: #0f172a;       /* Slate 900 */
    --text-secondary: #475569;     /* Slate 600 */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

/* Background Animated Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(50px) scale(1.1); }
}

/* Glass Card styling */
.main-container {
    width: 100%;
    max-width: 800px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}

/* Header */
.card-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #4f46e5, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.admin-link-bottom {
    display: inline-block;
    margin-top: 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.6;
    transition: var(--transition);
}

.admin-link-bottom:hover {
    opacity: 1;
    color: var(--primary-color);
}

.card-footer {
    margin-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 1rem;
}

/* Form Styles */
.mood-form {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.required {
    color: var(--negative);
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.half {
    flex: 1;
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.8);
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text-primary);
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    background: white;
}

/* Mood Grid */
.mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.mood-option input[type="radio"] {
    display: none;
}

.mood-content {
    background: white;
    border: 2px solid transparent;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.mood-content .emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mood-content .mood-text {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-secondary);
}

.mood-option:hover .mood-content {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.mood-option:hover .emoji {
    transform: scale(1.2);
}

/* Radio button Checked styles */
.mood-option input[type="radio"]:checked + .mood-content {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.mood-option input[type="radio"]:checked + .mood-content .mood-text {
    color: var(--primary-color);
    font-weight: 800;
}

.mood-option input[type="radio"]:checked + .mood-content .emoji {
    transform: scale(1.3);
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1.3); }
    50% { transform: scale(1.5); }
}

/* Color coding for typed emotions (visual feedback) */
.mood-option[data-type="positive"] input[type="radio"]:checked + .mood-content {
    border-color: var(--positive);
    background: rgba(34, 197, 94, 0.05);
}
.mood-option[data-type="positive"] input[type="radio"]:checked + .mood-content .mood-text { color: var(--positive); }

.mood-option[data-type="negative"] input[type="radio"]:checked + .mood-content {
    border-color: var(--negative);
    background: rgba(239, 68, 68, 0.05);
}
.mood-option[data-type="negative"] input[type="radio"]:checked + .mood-content .mood-text { color: var(--negative); }


/* Buttons */
.form-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1rem 3rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading State for Button */
.submit-btn.loading span {
    opacity: 0;
}
.submit-btn.loading .btn-loader {
    display: block;
}

/* Success Message */
.hidden {
    display: none !important;
}

.success-message {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.5s ease forwards;
}

.success-icon {
    font-size: 5rem;
    animation: popUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-message h3 {
    font-size: 2rem;
    color: var(--positive);
}

.success-message p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.btn-secondary {
    margin-top: 1rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

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

@keyframes popUp {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .glass-card {
        padding: 2rem 1.5rem;
    }

    .mood-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
