/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Root Variables - Light Theme (Default) */
:root {
    --primary-color: #0066ff;
    --secondary-color: #00cc99;
    --accent-color: #ff6b6b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-gray: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --input-bg: #f1f5f9;
}

/* Dark Theme Variables */
body.dark-theme {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f1f5f9;
    --text-gray: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --input-bg: #0f172a;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.theme-toggle i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.theme-toggle span {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Hide theme text on mobile */
@media (max-width: 768px) {
    .theme-toggle span {
        display: none;
    }
    .theme-toggle {
        padding: 12px;
    }
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: float 20s infinite ease-in-out;
}

body.dark-theme .floating-shape {
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--gradient-1);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--gradient-2);
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--gradient-3);
    bottom: 10%;
    left: 20%;
    animation-delay: 10s;
}

.shape-4 {
    width: 180px;
    height: 180px;
    background: var(--gradient-4);
    top: 30%;
    right: 30%;
    animation-delay: 15s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(50px, 50px) rotate(90deg);
    }
    50% {
        transform: translate(0, 100px) rotate(180deg);
    }
    75% {
        transform: translate(-50px, 50px) rotate(270deg);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
    margin-top: 40px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    animation: slideDown 0.6s ease-out;
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Main Content */
.main-content {
    animation: fadeIn 0.8s ease-out;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-hover);
}

.card h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i {
    color: var(--secondary-color);
}

/* Form Group */
.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.form-group label i {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-label:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.checkbox-label span {
    color: var(--text-color);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.checkbox-label:has(input:checked) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: var(--primary-color);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.radio-label:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.radio-label span {
    color: var(--text-color);
}

.radio-label input[type="radio"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.radio-label input[type="radio"]:checked + span {
    color: var(--secondary-color);
    font-weight: 600;
}

.radio-label:has(input:checked) {
    background: linear-gradient(135deg, rgba(0, 204, 153, 0.1) 0%, rgba(0, 255, 200, 0.1) 100%);
    border-color: var(--secondary-color);
}

/* Textarea */
textarea {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Button Container */
.button-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* Buttons */
.btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.btn i {
    font-size: 1.2rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--gradient-4);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.4);
}

.btn-success {
    background: var(--success-color);
    color: white;
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 15px;
    margin: 30px 0;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 5px solid var(--border-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1.2rem;
    color: var(--text-gray);
}

/* Report Section */
.report-section {
    animation: slideUp 0.6s ease-out;
}

.report-content {
    background: var(--input-bg);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.report-content::-webkit-scrollbar {
    width: 10px;
}

.report-content::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 5px;
}

.report-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.report-content h3 {
    color: var(--secondary-color);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.report-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-color);
}

.report-content ul, .report-content ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

.report-content li {
    margin-bottom: 8px;
    color: var(--text-color);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    margin-top: 50px;
    color: var(--text-gray);
    border-top: 1px solid var(--border-color);
}

/* Text Input Styling (for Standard field) */
.form-group input[type="text"],
.form-group .text-input {
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group .text-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* Select Dropdown Styling (for Board field) */
.form-group select,
.form-group .select-input {
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 45px;
}

.form-group select:focus,
.form-group .select-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(0, 204, 153, 0.1);
}

.form-group select:hover,
.form-group .select-input:hover {
  border-color: var(--secondary-color);
}

/* Dark theme adjustments */
/* body.dark-theme .form-group input[type="text"]
body.dark-theme .form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
} */

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        margin-top: 60px;
    }
    
    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card {
        padding: 20px;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .button-container {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Percentage Input Styling */
    .percentage-input {
        width: 100%;
        max-width: 150px;
        padding: 10px 15px;
        margin-top: 10px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        font-size: 1.1rem;
        font-weight: 600;
        text-align: center;
        transition: all 0.3s ease;
        background: var(--card-bg);
        color: var(--primary-color);
        display: block;
    }   

    .percentage-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    }

    .dark-theme .percentage-input {
        background-color: #2a2a2a;
        border-color: #444;
        color: #fff;
    }

    .dark-theme .percentage-input:focus {
        border-color: var(--secondary-color);
        box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
    }

    .checkbox-label {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .checkbox-label .checkbox-wrapper {
        display: flex;
        align-items: center;
        width: 100%;
    }    
}
