:root {
    --primary-color: #cd2324;
    --secondary-color: #992475;
    --accent-color: #ff9800;
    --text-color: #333;
    --bg-gradient: linear-gradient(135deg, #fff0f5 0%, #fce4ec 50%, #f8bbd9 100%);
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Poppins', 'Noto Sans Gujarati', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.niyam-header {
    background: white;
    padding: 20px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    border-bottom: 3px solid var(--primary-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    gap: 15px;
}

.logo-img {
    height: 60px;
    object-fit: contain;
}

.title-section h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
}

.title-section p {
    font-size: 14px;
    color: var(--secondary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

/* Grid Layout */
.niyam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.niyam-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
}

.niyam-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.niyam-card.selected {
    border-color: var(--primary-color);
    background: #fff9fa;
}

.niyam-card.selected::after {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.niyam-image {
    width: 100%;
    height: 180px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.niyam-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.niyam-info {
    padding: 20px;
    text-align: center;
}

.niyam-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Form Styles */
.form-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 50px;
}

.section-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(205, 35, 36, 0.1);
}

/* Table Styles */
.niyam-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.niyam-table th,
.niyam-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.niyam-table th {
    background: #f9f9f9;
    color: var(--secondary-color);
    font-weight: 600;
}

.niyam-table input {
    width: 80px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(205, 35, 36, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(205, 35, 36, 0.4);
}

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

.center-btn {
    text-align: center;
    margin-top: 30px;
}

/* Footer */
.niyam-footer {
    padding: 40px 0;
    margin-top: 50px;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin-bottom: 20px;
}

.footer-content {
    text-align: center;
}

.developer-credit {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.developer-credit a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.navkar-logo {
    height: 30px;
    opacity: 0.7;
    transition: var(--transition);
}

.navkar-logo:hover {
    opacity: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .niyam-header {
        padding: 30px 0;
    }

    .form-section {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .btn-primary {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
        margin-bottom: 10px;
    }

    .center-btn, .action-btns {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 20px;
    }

    .niyam-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .niyam-name {
        font-size: 16px;
    }

    .niyam-image {
        height: 120px;
    }

    .title-section h1 {
        font-size: 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .niyam-table th, .niyam-table td {
        padding: 10px 5px;
        font-size: 14px;
    }

    .niyam-table input {
        width: 60px;
    }
}

/* Success page specific adjustments */
.success-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

@media (max-width: 576px) {
    .success-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .success-buttons .btn-primary {
        width: 100%;
    }
}