@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&family=Lalezar&display=swap');

.fcc-container {
    max-width: 1000px;
    margin: 40px auto;
    font-family: 'Cairo', sans-serif;
    color: #333;
    direction: rtl;
    text-align: center;
}

.fcc-container h2 {
    font-family: 'Lalezar', cursive;
    font-size: 2.5rem;
    color: #0073aa;
    margin-bottom: 30px;
}

.fcc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.fcc-card-option {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.fcc-card-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.fcc-card-option.active {
    border-color: #0073aa;
    transform: scale(1.05);
}

.fcc-card-option img {
    width: 100%;
    display: block;
}

.fcc-preview-section {
    margin: 30px auto;
    position: relative;
    max-width: 600px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#fcc-card-canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.fcc-input-section {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.fcc-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

#fcc-user-name {
    padding: 12px 20px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    flex: 1;
    outline: none;
    transition: border-color 0.3s;
}

.fcc-color-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9f9f9;
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.fcc-color-selector label {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

#fcc-user-color {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.fcc-color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fcc-btn-mini {
    padding: 8px 15px;
    font-size: 14px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.fcc-btn-mini:hover {
    background: #005177;
}

.fcc-actions {
    display: flex;
    gap: 15px;
}

.fcc-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #0073aa;
    color: #fff;
}

.fcc-btn:hover {
    background: #005177;
    transform: translateY(-2px);
}

.fcc-btn.secondary {
    background: #eee;
    color: #333;
}

.fcc-btn.secondary:hover {
    background: #ddd;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .fcc-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .fcc-container h2 {
        font-size: 1.8rem;
    }

    .fcc-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .fcc-controls {
        flex-direction: column;
        gap: 15px;
    }

    #fcc-user-name {
        width: 100%;
        font-size: 16px;
    }

    .fcc-color-selector {
        width: 100%;
        justify-content: space-between;
        box-sizing: border-box;
    }

    .fcc-actions {
        width: 100%;
        flex-direction: column;
    }

    .fcc-btn {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .fcc-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Modal Styles */
.fcc-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcc-modal-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    text-align: center;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}

.fcc-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}

.fcc-close:hover {
    color: #000;
}

.fcc-modal-content h3 {
    margin-top: 0;
    font-family: 'Lalezar', cursive;
    color: #0073aa;
}

.fcc-modal-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

#fcc-modal-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}

.fcc-modal-actions {
    margin-top: 20px;
}
