/* ============================================
   PORTFOLIO STYLES & PLAYERS
   ============================================ */

/* Music Portfolio */
.music-card {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: var(--transition-medium);
}

.music-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.music-cover {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.music-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

.music-card:hover .music-overlay {
    opacity: 1;
}

.music-overlay .play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-neon);
    border: none;
    color: var(--dark-bg);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.music-overlay .play-btn:hover {
    transform: scale(1.1);
}

.music-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.music-info h3 {
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.music-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
}

.music-mood {
    color: var(--primary-color);
    font-size: 0.875rem;
}

/* Audio Player */
.audio-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

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

.player-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
}

.player-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.player-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.player-cover {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

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

.player-info {
    text-align: center;
}

.player-info h3 {
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
}

.player-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-neon);
    border-radius: 2px;
    width: 0;
    transition: width 0.1s linear;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.player-controls button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: var(--spacing-xs);
}

.player-controls button:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

#playPause {
    width: 50px;
    height: 50px;
    background: var(--gradient-neon);
    border-radius: 50%;
    color: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

#volumeSlider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

/* Video Portfolio */
.video-card {
    cursor: pointer;
    transition: var(--transition-medium);
}

.video-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.video-overlay .play-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 4rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.video-overlay .play-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
}

.video-info {
    padding: var(--spacing-sm);
}

.video-info h3 {
    margin-bottom: var(--spacing-xs);
}

.video-type {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.video-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: auto;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.video-container {
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

.video-info {
    padding: var(--spacing-md);
}

/* Writing Portfolio */
.writing-card {
    padding: var(--spacing-md);
    transition: var(--transition-medium);
    cursor: pointer;
}

.writing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.writing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.writing-header h3 {
    color: var(--text-primary);
}

.writing-type {
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.875rem;
    font-weight: 600;
}

.writing-preview {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    min-height: 80px;
}

.btn-read-more {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-medium);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.btn-read-more:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    transform: translateX(5px);
}

/* Text Modal */
.text-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.text-modal.active {
    opacity: 1;
}

.text-modal .modal-content {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--glass-border);
}

.modal-body {
    padding: var(--spacing-sm) 0;
}

.text-type {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

.text-content {
    color: var(--text-primary);
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Other Works */
.other-card {
    transition: var(--transition-medium);
    cursor: pointer;
}

.other-card:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.other-thumbnail {
    width: 100%;
    padding-bottom: 100%; /* Square aspect ratio */
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.other-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.other-info {
    padding: var(--spacing-sm);
}

.other-info h3 {
    margin-bottom: var(--spacing-xs);
}

.other-type {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.other-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .audio-player {
        width: calc(100vw - 40px);
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .music-card {
        flex-direction: column;
        text-align: center;
    }
    
    .music-cover {
        margin: 0 auto;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .player-controls {
        gap: var(--spacing-sm);
    }
    
    #volumeSlider {
        display: none;
    }
}