/* ===== CREATE PAGE STYLES ===== */

.create-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
}

.create-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.create-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.back-link {
    position: absolute;
    left: 0;
    top: 0;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.back-link:hover {
    transform: translateX(-5px);
}

.logo-create {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.create-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.create-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.create-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.create-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.section-hint {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    margin-bottom: 25px;
}

.upload-area:hover {
    background: #f0f4ff;
    transform: scale(1.02);
}

.upload-area.drag-over {
    background: #e8f0ff;
    border-color: #4c6ef5;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.upload-area p {
    color: #7f8c8d;
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f0f0f0;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.preview-remove:hover {
    background: #ff0000;
    transform: scale(1.1);
}

.preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    font-size: 0.7rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gallery-header h3 {
    font-size: 1.3rem;
    color: #2c3e50;
}

.photo-count {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-btn-view,
.gallery-btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.gallery-btn-view {
    background: #667eea;
    color: white;
}

.gallery-btn-delete {
    background: #e74c3c;
    color: white;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-hint {
    font-size: 0.9rem;
    color: #95a5a6;
}

.create-actions {
    text-align: center;
    margin-top: 40px;
}

.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-large {
    padding: 18px 50px;
    font-size: 1.2rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Success */
.toast-success {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #4CAF50;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 10000;
}

.toast-success.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.5rem;
}

/* Photo Modal */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.photo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
}

.photo-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.photo-modal-info {
    padding: 20px;
    background: #f8f9fa;
    text-align: center;
}

/* Link Modal */
.link-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.link-modal-content {
    background: white;
    border-radius: 25px;
    padding: 50px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.link-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e0e0e0;
    color: #2c3e50;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.link-modal-close:hover {
    background: #d0d0d0;
    transform: scale(1.1);
}

.link-modal-header {
    text-align: center;
    margin-bottom: 40px;
}

.success-icon-large {
    width: 80px;
    height: 80px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.link-modal-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.link-modal-header p {
    color: #7f8c8d;
}

.link-section {
    margin-bottom: 30px;
}

.link-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.link-input-group {
    display: flex;
    gap: 10px;
}

.link-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
}

.btn-copy {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-copy:hover {
    background: #5568d3;
}

.qr-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.qr-section h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.qr-section p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.qr-code-display {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.link-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .create-container {
        padding: 30px 20px;
    }

    .create-section {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .link-modal-content {
        padding: 30px 20px;
    }

    .link-actions {
        flex-direction: column;
    }
}
