* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    min-height: 100vh;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 15px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

header h2 {
    color: #1DB954;
    font-weight: 600;
}

main {
    padding: 100px 30px 30px;
    max-width: 800px;
    margin: 0 auto;
}

.spotify-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.spotify-section:hover {
    transform: translateY(-3px);
}

.spotify-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.spotify-header i {
    color: #1DB954;
    font-size: 2.5rem;
}

.spotify-header h2 {
    color: #191414;
    font-size: 1.8rem;
}

.description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.input-with-actions {
    position: relative;
    flex: 1;
}

.input-with-actions input {
    padding-right: 80px;
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-with-actions input:focus {
    border-color: #1DB954;
    outline: none;
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.2);
}

.input-buttons {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
}

.spotbtn {
    background: #1DB954;
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.spotbtn:hover {
    background: #1aa34a;
    transform: scale(1.02);
}

.spotbtn:active {
    transform: scale(0.98);
}

.clear-btn, .paste-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn {
    display: none;
    color: #666;
    background: #1DB954;
    font-size: 20px;
}

.paste-btn {
    display: flex;
    color: #666;
    background: #1DB954;
    padding: 10px 25px;
    font-size: 20px;
}

.clear-btn:hover {
    background: rgba(29, 185, 84, 0.1);
    color: #1DB954;
}

.paste-btn:hover {
    background: rgba(29, 185, 84, 0.1);
    color: #1DB954;
}

.clear-btn:active, .paste-btn:active {
    transform: scale(0.95);
}

.input-with-actions input:not(:placeholder-shown) + .input-buttons .paste-btn {
    display: none;
}

.input-with-actions input:not(:placeholder-shown) + .input-buttons .clear-btn {
    display: flex;
}

.result-box {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border: 1px dashed #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-height: 120px;
    justify-content: center;
}

.result-box i {
    color: #1DB954;
    font-size: 2rem;
}

.result-box span {
    color: #555;
    font-size: 1rem;
}

.track-info {
    display: none;
    gap: 20px;
    margin-top: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    align-items: center;
}

.track-cover img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.track-details {
    flex: 1;
}

.track-details h3 {
    color: #191414;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.track-details p {
    color: #666;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1DB954;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #1aa34a;
    transform: translateY(-2px);
}

.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

@media (max-width: 600px) {
    main {
        padding: 90px 15px 15px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .spotbtn {
        justify-content: center;
        padding: 12px;
    }

    .input-buttons {
        right: 5px;
    }
}
