:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.5);
    --success: #22c55e;
    --radius-lg: 1.5rem;
    --radius-md: 0.75rem;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 1rem 0.5rem;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

/* Background Blobs */
.blob-1, .blob-2 {
    position: fixed;
    width: 400px;
    height: 400px;
    filter: blur(100px);
    z-index: -1;
    border-radius: 50%;
    opacity: 0.4;
}

.blob-1 {
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 20s infinite alternate;
}

.blob-2 {
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
    animation: float 25s infinite alternate-reverse;
}

@keyframes float {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.1); }
}

/* Header */
header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo i {
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1 span {
    color: var(--primary);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Form Styling */
.glass-form {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.section-title i {
    font-size: 1.1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.input-group {
    margin-bottom: 0.75rem;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="date"],
input[type="time"] {
    padding-left: 2.8rem;
    color-scheme: dark;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

textarea {
    padding: 1rem;
    resize: none;
}

.time-range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.time-range span {
    color: var(--text-muted);
}

.time-range .input-wrapper {
    flex: 1;
}

.time-range input {
    padding-left: 1rem;
}

/* Toggle Radio Button */
.toggle-container {
    display: flex;
    background: var(--input-bg);
    padding: 0.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    gap: 0.4rem;
}

.toggle-container input[type="radio"],
.toggle-container input[type="checkbox"] {
    display: none;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 0.2rem);
    transition: all 0.3s ease;
    font-weight: 500;
    margin-bottom: 0;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

input:checked + .toggle-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Section Dynamic */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.add-btn {
    padding: 0.6rem 1rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.glass-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.glass-row:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 1rem;
}

.mini {
    max-width: 300px;
}

.remove-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #ef4444;
    color: white;
}

/* Custom Select Group */
.custom-select-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--input-bg);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
}

.custom-select-group input[type="radio"] {
    display: none;
}

.custom-select-group label {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 0.2rem);
    transition: all 0.2s ease;
    font-size: 0.85rem;
    margin-bottom: 0;
    color: var(--text-muted);
}

.custom-select-group input[type="radio"]:checked + label {
    background: var(--primary);
    color: white;
}

/* Rating Grid */
.rating-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.rating-item {
    display: flex;
    flex-direction: column;
}

/* Premium Button */
.form-actions {
    margin-top: 2rem;
}

.submit-btn {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    background-size: 200% auto;
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3), 0 0 20px rgba(168, 85, 247, 0.2);
    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: 0.5s;
}

.submit-btn:hover {
    background-position: right center;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4), 0 0 30px rgba(168, 85, 247, 0.4);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(-1px) scale(1);
}

/* Report Area */
.report-container {
    margin-top: 3rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

.report-header {
    background: rgba(99, 102, 241, 0.1);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.report-header h3 {
    font-size: 1.1rem;
    color: var(--primary);
}

.report-content {
    padding: 2rem;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    color: #e2e8f0;
    max-height: 500px;
    overflow-y: auto;
}

.copy-btn {
    padding: 0.5rem 1rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    transform: scale(1.05);
    background: #16a34a;
}

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

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Enhancements for Mobile */
@media (max-width: 640px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .app-container {
        max-width: 100%;
    }

    .glass-form {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
    }
    
    header {
        margin-bottom: 1.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .grid-2, .rating-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .glass-row {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .status-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .mini {
        max-width: 100%;
    }
    
    .remove-btn {
        width: 100%;
        height: 45px;
    }

    .custom-select-group {
        gap: 0.3rem;
        padding: 0.3rem;
    }

    .custom-select-group label {
        min-width: 70px;
        font-size: 0.8rem;
        padding: 0.6rem 0.3rem;
    }

    .report-content {
        padding: 1.25rem;
        font-size: 0.85rem;
    }

    .add-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

.mt-1 { margin-top: 1rem; }
