/* Apple-Style Design for Marvin & Marvina Mind Portfolio */

* {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.font-display {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

/* Smooth scroll offset for fixed nav */
section {
    scroll-margin-top: 80px;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card hover effects - Apple style */
.card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* Book card specific styles */
.book-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.book-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

.book-cover {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background: white;
}

/* Music card styles */
.music-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.music-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

.album-cover {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: white;
}

/* Streaming platform buttons */
.streaming-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.streaming-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-spotify {
    background-color: #1DB954;
    color: white;
}

.btn-apple-music {
    background-color: #FA243C;
    color: white;
}

.btn-youtube {
    background-color: #FF0000;
    color: white;
}

.btn-amazon {
    background-color: #FF9900;
    color: white;
}

.btn-soundcloud {
    background-color: #FF5500;
    color: white;
}

.btn-bandcamp {
    background-color: #629aa9;
    color: white;
}

.btn-tidal {
    background-color: #000000;
    color: white;
}

.btn-deezer {
    background-color: #FF0092;
    color: white;
}

/* Project card styles */
.project-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
}

/* App card styles */
.app-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12);
}

.app-icon {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background-color: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

.badge-secondary {
    background-color: rgba(88, 86, 214, 0.1);
    color: #5856D6;
}

.badge-accent {
    background-color: rgba(255, 149, 0, 0.1);
    color: #FF9500;
}

/* Loading spinner */
.spinner {
    border: 4px solid rgba(0, 122, 255, 0.1);
    border-top-color: #007AFF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Social media hover effects */
.social-link {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-link:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Payment button styles */
.btn-buy-direct {
    background: #1D1D1F;
    color: white;
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-buy-direct:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    background: #000000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .book-cover,
    .album-cover {
        height: 300px;
    }
    
    .project-image {
        height: 200px;
    }
}

/* Admin panel styles */
.admin-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1D1D1F;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #E5E5E7;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Success/Error messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: rgba(52, 199, 89, 0.1);
    color: #28a745;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.alert-error {
    background-color: rgba(255, 59, 48, 0.1);
    color: #dc3545;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

/* Table styles for admin panel */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
}

.admin-table th {
    background-color: #F5F5F7;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #1D1D1F;
}

.admin-table td {
    padding: 1rem;
    border-top: 1px solid #E5E5E7;
}

.admin-table tr:hover {
    background-color: #FAFAFA;
}

/* Button styles */
.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
}

.btn-primary {
    background: #007AFF;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 122, 255, 0.3);
    background: #0051D5;
}

.btn-secondary {
    background: white;
    color: #007AFF;
    border: 2px solid #007AFF;
}

.btn-secondary:hover {
    background: #007AFF;
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: #FF3B30;
    color: white;
}

.btn-danger:hover {
    background: #CC0000;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 59, 48, 0.3);
}

.btn-success {
    background: #34C759;
    color: white;
}

.btn-success:hover {
    background: #248A3D;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #86868B;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Active navigation link */
.nav-link.text-apple-dark {
    font-weight: 600;
}

/* Tab styles */
.tab-btn {
    transition: all 0.2s ease;
}

.tab-btn.active {
    border-bottom: 2px solid #007AFF;
    color: #007AFF;
}

/* Image Picker Modal */
.image-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-picker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.image-picker-content {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.image-picker-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #E5E5E7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-picker-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F5F5F7;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1D1D1F;
}

.image-picker-close:hover {
    background: #E5E5E7;
    transform: scale(1.1);
}

.image-picker-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

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

.image-picker-item {
    position: relative;
    border: 2px solid #E5E5E7;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-picker-item:hover {
    border-color: #007AFF;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.2);
}

.image-picker-item:hover .image-picker-select {
    opacity: 1;
}

.image-picker-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #F9F9F9;
}

.image-picker-name {
    padding: 0.5rem;
    font-size: 0.75rem;
    color: #86868B;
    background: white;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-picker-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 2rem);
    background: rgba(0, 122, 255, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Image preview in form */
.image-preview-container {
    position: relative;
    display: inline-block;
}

.image-preview-thumb {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 2px solid #E5E5E7;
}

.image-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FF3B30;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

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

/* Browse images button in forms */
.browse-images-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #F5F5F7;
    border: 2px solid #E5E5E7;
    border-radius: 0.5rem;
    color: #007AFF;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.browse-images-btn:hover {
    background: #E5E5E7;
    border-color: #007AFF;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Backdrop blur for navigation */
.backdrop-blur-xl {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Smooth transitions for all interactive elements */
a, button, input, textarea, select {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile menu button */
#mobile-menu-btn {
    color: #86868B;
}

#mobile-menu-btn:hover {
    color: #1D1D1F;
}

/* Drag and Drop styles */
.draggable {
    cursor: move;
    user-select: none;
}

.draggable:active {
    cursor: grabbing;
}

.drag-handle {
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Smooth transitions for drag items */
.list-item {
    transition: margin 0.2s ease, opacity 0.2s ease;
}

/* Coming Soon Banner */
.coming-soon-banner {
    position: absolute;
    top: 20px;
    right: -35px;
    background: linear-gradient(135deg, #FF9500 0%, #FF6B00 100%);
    color: white;
    padding: 8px 50px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transform: rotate(45deg);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.4);
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.coming-soon-banner::before,
.coming-soon-banner::after {
    content: '';
    position: absolute;
    top: 0;
    width: 10px;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.coming-soon-banner::before {
    left: 0;
}

.coming-soon-banner::after {
    right: 0;
}
