:root {
    --gc-popup-zindex: 999999;
    --gc-overlay-bg: rgba(0, 0, 0, 0.5);
    --gc-container-bg: #ffffff;
    --gc-container-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gc-container-radius: 12px;
    --gc-primary: #2271b1;
    --gc-primary-hover: #135e96;
    --gc-success: #00a32a;
    --gc-warning: #dba617;
    --gc-error: #d63638;
    --gc-text: #1d2327;
    --gc-text-light: #646970;
    --gc-border: #dcdcde;
    --gc-star-empty: #d1d5db;
    --gc-star-filled: #ffb400;
    --gc-star-hover: #ffd700;
    --gc-transition: all 0.3s ease;
}

.gc-feedback-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--gc-popup-zindex);
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gc-feedback-popup.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gc-feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gc-overlay-bg);
    animation: gcFadeIn 0.3s ease;
}

.gc-feedback-container {
    position: relative;
    background: var(--gc-container-bg);
    border-radius: var(--gc-container-radius);
    box-shadow: var(--gc-container-shadow);
    max-width: 90vw;
    width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: gcSlideIn 0.3s ease;
    transform-origin: center center;
}

.gc-feedback-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gc-text-light);
    border-radius: 50%;
    transition: var(--gc-transition);
    z-index: 1;
}

.gc-feedback-close:hover {
    background: var(--gc-border);
    color: var(--gc-text);
}

.gc-feedback-step {
    display: none;
    padding: 40px 30px 30px;
    text-align: center;
}

.gc-feedback-step.active {
    display: block;
    animation: gcFadeIn 0.3s ease;
}

.gc-feedback-step h2 {
    margin: 0 0 30px;
    color: var(--gc-text);
    font-size: 1.5em;
    font-weight: 600;
    line-height: 1.4;
}

.gc-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.gc-star {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--gc-star-empty);
    transition: var(--gc-transition);
    border-radius: 4px;
}

.gc-star:hover {
    color: var(--gc-star-hover);
    transform: scale(1.2);
}

.gc-star.active {
    color: var(--gc-star-filled);
}

.gc-star svg {
    width: 48px;
    height: 48px;
}

.gc-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 30px 0;
    text-align: left;
}

.gc-choice {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid var(--gc-border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--gc-transition);
}

.gc-choice:hover {
    border-color: var(--gc-primary);
    background: rgba(34, 113, 177, 0.05);
}

.gc-choice input {
    margin: 0 12px 0 0;
}

.gc-choice span {
    flex: 1;
    font-weight: 500;
}

.gc-form-group {
    margin: 20px 0;
    text-align: left;
}

.gc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gc-text);
}

.gc-form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gc-border);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--gc-transition);
    box-sizing: border-box;
}

.gc-form-control:focus {
    outline: none;
    border-color: var(--gc-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.gc-form-control textarea {
    min-height: 100px;
    resize: vertical;
}

.gc-form-options {
    margin: 20px 0;
    text-align: left;
}

.gc-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.gc-option input {
    margin: 0;
}

.gc-button {
    background: var(--gc-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--gc-transition);
    display: inline-block;
    text-decoration: none;
}

.gc-button:hover {
    background: var(--gc-primary-hover);
    transform: translateY(-1px);
}

.gc-button:disabled {
    background: var(--gc-text-light);
    cursor: not-allowed;
    transform: none;
}

.gc-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

.gc-success-animation {
    margin: 20px 0;
    color: var(--gc-success);
    animation: gcBounce 0.6s ease;
}

.gc-success-animation svg {
    width: 64px;
    height: 64px;
}

.gc-step-success h2 {
    color: var(--gc-success);
}

.gc-step-success p {
    color: var(--gc-text-light);
    margin: 0 0 30px;
    font-size: 16px;
    line-height: 1.5;
}

/* Animations */
@keyframes gcFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gcSlideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes gcBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -20px, 0);
    }
    70% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .gc-feedback-container {
        width: 95vw;
        max-width: 400px;
        margin: 20px;
    }
    
    .gc-feedback-step {
        padding: 30px 20px 20px;
    }
    
    .gc-feedback-step h2 {
        font-size: 1.3em;
    }
    
    .gc-star svg {
        width: 40px;
        height: 40px;
    }
    
    .gc-choices {
        gap: 8px;
    }
    
    .gc-choice {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gc-feedback-container {
        width: 100vw;
        height: 100vh;
        max-width: none;
        max-height: none;
        border-radius: 0;
        margin: 0;
    }
    
    .gc-feedback-step {
        padding: 50px 20px 20px;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .gc-stars {
        margin: 20px 0;
    }
    
    .gc-star svg {
        width: 36px;
        height: 36px;
    }
}

/* Focus trap and accessibility */
.gc-feedback-popup *:focus {
    outline: 2px solid var(--gc-primary);
    outline-offset: 2px;
}

.gc-feedback-popup[aria-hidden="true"] {
    display: none;
}

.gc-feedback-popup[aria-hidden="false"] {
    display: flex;
}

/* Loading state */
.gc-button.loading {
    position: relative;
    color: transparent;
}

.gc-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: gcSpin 1s linear infinite;
}

@keyframes gcSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error states */
.gc-form-control.error {
    border-color: var(--gc-error);
}

.gc-error-message {
    color: var(--gc-error);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.gc-error-message.show {
    display: block;
}