:root {
    --ifgp-primary: #cd2757;
    --ifgp-primary-hover: #b01e4a;
    --ifgp-secondary: #285AEB;
    --ifgp-success: #4CAF50;
    --ifgp-text: #2c3338;
    --ifgp-text-muted: #646970;
    --ifgp-bg-light: #f6f7f7;
    --ifgp-border: #dcdcde;
    --ifgp-radius: 12px;
    --ifgp-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --ifgp-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --ifgp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets for Plugin Page */
.ifgp-admin-wrap *,
.ifgp-admin-wrap *::before,
.ifgp-admin-wrap *::after {
    box-sizing: border-box;
}

.ifgp-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    box-sizing: border-box;
}

[class*="ifgp-col-"] {
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive Grid */
@media (min-width: 768px) {
    .ifgp-col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; width: 8.333333%; }
    .ifgp-col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; width: 16.666667%; }
    .ifgp-col-md-3 { flex: 0 0 25%; max-width: 25%; width: 25%; }
    .ifgp-col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; width: 33.333333%; }
    .ifgp-col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; width: 41.666667%; }
    .ifgp-col-md-6 { flex: 0 0 50%; max-width: 50%; width: 50%; }
    .ifgp-col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; width: 58.333333%; }
    .ifgp-col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; width: 66.666667%; }
    .ifgp-col-md-9 { flex: 0 0 75%; max-width: 75%; width: 75%; }
    .ifgp-col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; width: 83.333333%; }
    .ifgp-col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; width: 91.666667%; }
    .ifgp-col-md-12 { flex: 0 0 100%; max-width: 100%; width: 100%; }
}

/* Premium Buttons */
.igp_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--ifgp-transition);
    text-decoration: none !important;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.igp_button.button_1 {
    background: var(--ifgp-success);
    color: #fff;
}

.igp_button.button_1:hover {
    background: #43a047;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.igp_button.button_primary {
    background: var(--ifgp-primary);
    color: #fff;
}

.igp_button.button_primary:hover {
    background: var(--ifgp-primary-hover);
    transform: translateY(-2px);
}

/* Glassmorphism Header */
.ifgp-glass-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--ifgp-radius);
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: var(--ifgp-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ifgp-glass-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.5;
    padding-bottom: 2px;
    background: linear-gradient(45deg, var(--ifgp-primary), var(--ifgp-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Modern Tab System */
.ifgp-tab-container {
    background: #fff;
    border-radius: var(--ifgp-radius);
    box-shadow: var(--ifgp-shadow);
    display: flex;
    overflow: hidden;
    min-height: 500px;
}

.ifgp-tab-menu {
    width: 220px;
    background: var(--ifgp-bg-light);
    border-right: 1px solid var(--ifgp-border);
    padding: 20px 0;
}

.ifgp-tab-menu .ifgp-tab-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--ifgp-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--ifgp-transition);
    border-left: 4px solid transparent;
    gap: 12px;
    cursor: pointer;
}

.ifgp-tab-menu .ifgp-tab-item:hover {
    background: #fff;
    color: var(--ifgp-primary);
}

.ifgp-tab-menu .ifgp-tab-item.active {
    background: #fff;
    color: var(--ifgp-primary);
    border-left-color: var(--ifgp-primary);
    font-weight: 700;
}

.ifgp-tab-content {
    flex: 1;
    padding: 40px;
}

.ifgp-tab-pane {
    display: none;
    animation: ifgp-fadeIn 0.4s ease;
}

.ifgp-tab-pane.active {
    display: block;
}

/* Card System */
.ifgp-card {
    background: #fff;
    border-radius: var(--ifgp-radius);
    border: 1px solid var(--ifgp-border);
    box-shadow: var(--ifgp-shadow);
    transition: var(--ifgp-transition);
    height: auto;
    overflow: hidden;
}

.ifgp-card:hover {
    box-shadow: var(--ifgp-shadow-hover);
    transform: translateY(-4px);
}

.ifgp-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--ifgp-border);
    background: var(--ifgp-bg-light);
}

.ifgp-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    padding-bottom: 2px;
}

.ifgp-card-body {
    padding: 20px;
}

/* Form Elements */
.ifgp-form-group {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--ifgp-border);
    padding-bottom: 25px;
}

.ifgp-form-group:last-child {
    border-bottom: none;
}

.ifgp-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ifgp-text);
}

.ifgp-help-text {
    font-size: 13px;
    color: var(--ifgp-text-muted);
    font-style: italic;
    margin-top: 4px;
}

/* Switch Component */
.ifgp-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.ifgp-switch input { opacity: 0; width: 0; height: 0; }

.ifgp-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.ifgp-slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .ifgp-slider { background-color: var(--ifgp-primary); }
input:checked + .ifgp-slider:before { transform: translateX(24px); }

/* Range Slider */
.ifgp-range-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ifgp-range {
    -webkit-appearance: none;
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
}

.ifgp-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--ifgp-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ifgp-range-value {
    background: var(--ifgp-primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    min-width: 30px;
    text-align: center;
}

/* Animations */
/* Action Bar & Footer */
.ifgp-action-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f6f7f7 100%);
    border-radius: var(--ifgp-radius);
    padding: 25px 35px;
    margin-top: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.ifgp-version-info h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.5;
    padding-bottom: 2px;
    background: linear-gradient(45deg, var(--ifgp-primary), var(--ifgp-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ifgp-badge {
    background: rgba(205, 39, 87, 0.08); /* light primary tint */
    color: var(--ifgp-primary);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(205, 39, 87, 0.2);
    margin-top: 8px;
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Utilities */
.ifgp-text-right { text-align: right; }
.ifgp-text-left { text-align: left; }
.ifgp-text-center { text-align: center; }
.ifgp-mt-20 { margin-top: 20px; }
.ifgp-mb-20 { margin-bottom: 20px; }
.ifgp-align-items-center { align-items: center; }

/* Modal Styling */
.ifgp-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.ifgp-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 40px;
    border-radius: var(--ifgp-radius);
    width: 600px;
    max-width: 90%;
    position: relative;
    box-shadow: var(--ifgp-shadow-hover);
    animation: ifgp-fadeIn 0.4s ease;
}

.ifgp-modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--ifgp-text-muted);
    cursor: pointer;
    transition: var(--ifgp-transition);
}

.ifgp-modal-close:hover {
    color: var(--ifgp-primary);
}

#awl-shortcode {
    width: 100%;
    height: 250px;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid var(--ifgp-border);
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.6;
    background: var(--ifgp-bg-light);
    color: var(--ifgp-primary);
    resize: vertical;
}

@keyframes ifgp-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ifgp-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.ifgp-pulse-badge {
    animation: ifgp-pulse 2s infinite ease-in-out;
}

/* Layout Selector */
.ifgp-layout-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.ifgp-layout-item input { display: none; }
.ifgp-layout-item label img {
    width: 100%;
    border: 3px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--ifgp-transition);
}

.ifgp-layout-item input:checked + label img {
    border-color: var(--ifgp-primary);
    box-shadow: 0 0 15px rgba(205, 39, 87, 0.3);
    transform: scale(1.05);
}

/* Modal */
.ifgp-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.ifgp-modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 40px;
    width: 90%;
    max-width: 700px;
    border-radius: var(--ifgp-radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    position: relative;
    animation: ifgp-fadeIn 0.3s ease-out;
}

.ifgp-modal-close {
    position: absolute;
    right: 25px; top: 20px;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: var(--ifgp-transition);
}

.ifgp-modal-close:hover { color: var(--ifgp-primary); }